batch file help - Page 2 - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 08-06-2006, 11:28 PM   #11 (permalink)
Monster Techie
 
Join Date: Apr 2005
Posts: 1,909
Send a message via AIM to jcortes
Default

ok ill keep searching around the internet aswell and let you know. talk to you soon. good luck
__________________

__________________

AIM = jcortestechhelp
jcortes is offline  
Old 08-07-2006, 12:15 PM   #12 (permalink)
It's all just 1s and 0s
 
office politics's Avatar
 
Join Date: Jan 2004
Location: in the lab
Posts: 6,555
Send a message via MSN to office politics
Default

you can try this.

execute a drive map to the machine.

find out the errorlevel for sucess and failure

in the batch run a if on the errorlevel

Code:
IF [NOT] ERRORLEVEL number command
http://www.computerhope.com/if.htm#03
__________________

office politics is offline  
Old 08-07-2006, 12:24 PM   #13 (permalink)
Monster Techie
 
Join Date: Dec 2003
Posts: 1,084
Send a message via Yahoo to IBMan
Default

thanks for the reply, could i get some help with the actual put together? I'm actually really new to batch files.
__________________
Server:
AMD Athlon 4000+ @ 2.4 GHz
4096 MB RAM
40 GB HDD
Dual Mirrored 500 GB HDDs
DVD-ROM Drive
Windows Server 2003 x64 R2 SP2
IBMan is offline  
Old 08-07-2006, 12:48 PM   #14 (permalink)
It's all just 1s and 0s
 
office politics's Avatar
 
Join Date: Jan 2004
Location: in the lab
Posts: 6,555
Send a message via MSN to office politics
Default

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
office politics is offline  
Old 08-07-2006, 01:01 PM   #15 (permalink)
Monster Techie
 
Join Date: Apr 2005
Posts: 1,909
Send a message via AIM to jcortes
Default

lol didnt realize it was just that hahaha awsome i didnt know that
__________________

AIM = jcortestechhelp
jcortes is offline  
Old 08-07-2006, 09:14 PM   #16 (permalink)
Monster Techie
 
Join Date: Dec 2003
Posts: 1,084
Send a message via Yahoo to IBMan
Default

sweet, thanks man, so if the computer name is not mmdc then will it just go onto the next command?
__________________
Server:
AMD Athlon 4000+ @ 2.4 GHz
4096 MB RAM
40 GB HDD
Dual Mirrored 500 GB HDDs
DVD-ROM Drive
Windows Server 2003 x64 R2 SP2
IBMan is offline  
Old 08-07-2006, 09:16 PM   #17 (permalink)
Monster Techie
 
Join Date: Apr 2005
Posts: 1,909
Send a message via AIM to jcortes
Default

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.
__________________

AIM = jcortestechhelp
jcortes is offline  
Old 08-07-2006, 09:20 PM   #18 (permalink)
Monster Techie
 
Join Date: Dec 2003
Posts: 1,084
Send a message via Yahoo to IBMan
Default

awesome, thanks jc and csam.
__________________
Server:
AMD Athlon 4000+ @ 2.4 GHz
4096 MB RAM
40 GB HDD
Dual Mirrored 500 GB HDDs
DVD-ROM Drive
Windows Server 2003 x64 R2 SP2
IBMan is offline  
Old 08-07-2006, 09:53 PM   #19 (permalink)
Monster Techie
 
Join Date: Dec 2003
Posts: 1,084
Send a message via Yahoo to IBMan
Default

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.
__________________
Server:
AMD Athlon 4000+ @ 2.4 GHz
4096 MB RAM
40 GB HDD
Dual Mirrored 500 GB HDDs
DVD-ROM Drive
Windows Server 2003 x64 R2 SP2
IBMan is offline  
Old 08-08-2006, 09:57 AM   #20 (permalink)
It's all just 1s and 0s
 
office politics's Avatar
 
Join Date: Jan 2004
Location: in the lab
Posts: 6,555
Send a message via MSN to office politics
Default

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
__________________

office politics is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 12:11 AM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.