Batch file help - Beginner

shinerthetech

Distinguished
Jan 16, 2012
126
0
18,710
I'm trying to create a batch file to block Internet explorer when I clone machines. As is stands how i have to open cmd prompt and type each command:

cd c:\ieblock
ie9_blocker %computername%

ie10_blocker %computername%

ie11_blocker %computername%

I tried to make a .bat file and typed the previous commands into 1 batch file, but it will only run the first line of the file - "ie9_blocker".

How can I get it to run all 3 commands with 1 batch file? Thanks for the help!
 
Solution
I am assuming the program you are trying to run is a command type program, any command type programs (non gui) will require its execution to finish before the batch file commences to the next command line parameter, you will have to make 3 seperate .bat files and execute them separately

hairystuff

Distinguished
I am assuming the program you are trying to run is a command type program, any command type programs (non gui) will require its execution to finish before the batch file commences to the next command line parameter, you will have to make 3 seperate .bat files and execute them separately
 
Solution

Wolfshadw

Titan
Moderator
Check to see if there are any command line switches available for IEBlock. It may be that you just need to add the switches to your execution line. Just as an example: c:\ieblock.exe -9 %computername% -10 %computername% -11 %computername%

-Wolf sends