|
|
 |

10-24-2005, 12:51 PM
|
 |
Administrator
|
|
Join Date: Aug 2000
Location: Orlando, Florida
Posts: 23,312
POST ID # = 219586
|
|
BAT file help
I'd like to create a BAT file that does the following:
1) Figures out which DC the PC is on.
2) Navigates to a folder and attempts to run a file. If it isn't found, navigate to a 2nd folder and runs a file there.
Any suggestions?
|

10-25-2005, 09:33 AM
|
 |
Headphone Geek
|
|
Join Date: Aug 2000
Location: Hell... no, wait, it's Indiana... um, well, nevermind.
Posts: 124
POST ID # = 219803
|
|
For 1), can you use the LOGONSERVER environment value? At a command prompt type set and see if that variable is there, and if so if it corresponds to the DC you expect it to.
A_Sr
__________________
A proud smartass since 1958.
|

10-25-2005, 10:09 AM
|
 |
Administrator
|
|
Join Date: Aug 2000
Location: Orlando, Florida
Posts: 23,312
POST ID # = 219807
|
|
yay, that worked!
For 2) I guess I can just attempt to run it, and if no go, nothing happens :)
|

10-25-2005, 10:35 AM
|
 |
Headphone Geek
|
|
Join Date: Aug 2000
Location: Hell... no, wait, it's Indiana... um, well, nevermind.
Posts: 124
POST ID # = 219812
|
|
Read up on If/Then statements in batch files. You should be able to do a IF XXX.exe file exists THEN execute it. IF xxx.exe file does not exist THEN go to location 2 and run YYY.exe.
Its been a long time but something should exist out there to help you through this.
A_Sr.
__________________
A proud smartass since 1958.
|

10-25-2005, 11:12 AM
|
 |
Administrator
|
|
Join Date: Aug 2000
Location: Orlando, Florida
Posts: 23,312
POST ID # = 219815
|
|
Found out we use some crazy super version of BAT files, so it's all good :)
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
The Corsair Support Forums
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|