Microsoft
Software
Hardware
Network
Question : Batch file syntax for "For" command
Hi,
I think this is simple for a batch file guru...
i have a batchfile where i add a computer name as the %1 variable after the filename like this:
Batchfile.bat Computername
Instead of computername, I want to have a list of computers to run this batch on..
computers are in a file called thelist.txt. batchfile.bat will vary, but something like
psexec.exe \\%1 -s msiexec.exe /x {guid}
so instead of one computer being listed as the %1 variable, I have a list of them in thelist.txt
and I would like the syntax to use for that, I'm assuming I guess that it will use the FOR command.
I hope that makes sense... Thanks !!!!
Answer : Batch file syntax for "For" command
I think in that case you could get away with something like this.
for /F "tokens=1" %%h IN (thelist.txt) Do psexec.exe \\%%h -s msiexec.exe /x {guid}
pause
Random Solutions
What's a good choice for Cloud?
Internet Usage Tool
asp.net I have a gridview that is updatedable. what I would like to do is pass its -> ID value to another page that would allow the user to update picture images for that user ID.
BGINFO via GPO server 2008, error loading bgi file even though its all loaded correctly
Cost of CAT5e cable installation
Display Yes/No field of a query as a checkbox
IRQL_NOT_LESS_OR_EQUAL MESSAGE
export or backup from sql 2008 server to a sql 2005
Hyper-V P2V VM Continuous Blue Screen
Windows server 2003 terminal users unable to view png images in IE