batch file help

Status
Not open for further replies.
ok ill keep searching around the internet aswell and let you know. talk to you soon. good luck :)
 
thanks for the reply, could i get some help with the actual put together? I'm actually really new to batch files.
 
ha ****ing duh. got halfway through a post and now i got something easier.

every machine should have a computername environmental variable set.

so

Code:
net use v: \\server\share
if %computername%==mmdc start v:\install.exe /silent
 
sweet, thanks man, so if the computer name is not mmdc then will it just go onto the next command?
 
yup thats what its writen to do . the if statement says if this statement is true then run the command in the bracets if not then move on.
 
ok, That doesn't work, the silent switch i have to use for this install is /An

so my syntax is net use v: \\fs1\install\nero
(this command goes through fine)

then the next command is

if %computername%==mmdc start v:\nero6.exe /An

but the batch file ends and no programs are run, no errors are shown.
 
try putting the start argument in double quotes

Code:
if %computername%==mmdc start "v:\nero6.exe /An"

you can try appending @pause as the next command to show output/errors

if that doesnt work run the batch from a command line prompt window
 
Status
Not open for further replies.
Back
Top Bottom