OK, I revised that code. My intention is as follows:
Write a "bombtemp.bat" batch file, which includes instructions to create another batch file in the startup folder, which will execute the code.
Ideally, I should have the following in the end:
In C:\Utilities\bombtemp.bat:
cd \Documents and Settings\Timothy\Start Menu\Programs\Startup\
@echo off > bombtemp2.bat
cd \Documents and Settings\Timothy\Desktop\Desktop Games\ >> bombtemp2.bat
bomb.exe '%choice%' >> bombtemp2.bat
cd \utilities >> bombtemp2.bat
In C:\Documents and Settings\Timothy\Start Menu\Programs\Startup\bombtemp2.bat:
@echo off
cd \Documents and Settings\Timothy\Desktop\Desktop Games\
bomb.exe '%choice%'
cd \utilities
And that's it. I used this batch file to achieve this:
@ECHO OFF
cls
ECHO This batch file will simulate a bombed program. It will place it in the startup
ECHO folder so it will run at next startup.
:begin
set choice=
set /p choice=Choose program to bomb:
IF EXIST %choice% GOTO create
ECHO Sorry, the specified program does not exist.
GOTO begin
:create
REM - creates the batch file and writes it
ECHO @echo off > bombtemp.bat
ECHO cd \Documents and Settings\Timothy\Start Menu\Programs\Startup\ >> bombtemp.bat
ECHO @echo off > bombtemp2.bat >> bombtemp.bat
ECHO cd \Documents and Settings\Timothy\Desktop\Desktop Games\ >> bombtemp2.bat >> bombtemp.bat
ECHO bomb.exe '%choice%' >> bombtemp2.bat >> bombtemp.bat
ECHO cd \utilities >> bombtemp2.bat >> bombtemp.bat
call bombtemp.bat
What I got was "bombtemp.bat" in the startup folder with this code:
@echo off
cd \Documents and Settings\Timothy\Start Menu\Programs\Startup\
@echo off
cd \Documents and Settings\Timothy\Desktop\Desktop Games\
bomb.exe '"C:\Program Files\Opera\Opera.exe"'
cd \utilities
What the heck did I do wrong?