Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run a batch file on XP Pro? 2

Status
Not open for further replies.

torandson

Technical User
Feb 8, 2005
239
A1
Hi,
I tried to install multiple security patches by creating a batch file per the KB articles I have read and re-read, and my batch file looks exactly like the examples.

But when I open a command window and navigate to the folder containing my 'Update.bat' file, and then type "Update," I get a message that this is not a recognizable command, or that "Windows" is not a recognizable command, or something.

All of the exec paths in the batch file contain strings like
Code:
D:\MyFolder\Windows Update\Step 5\blah, blah.exe

Are spaces not allowed in the path in this case? Or is there some other problem?

Anyone got a simple explanation for how to get from the batch file to the installed security patches?

Do I have to unpack all of the files from the downloaded exec files first?

--torandson
 
Take this KB for example:
What is not clearly stated is that the spaces in the command line are avoided by setting an environmental variable for the pathing. If you want to instead enter the complete path, use "'s.

e.g. as shown by the KB article:
set PATHTOFIXES=D:\MyFolder\Windows Update\Step 5
%PATHTOFIXES%\blah, blah.exe -z -m

In the alternative:
"D:\MyFolder\Windows Update\Step 5\blah, blah.exe" -z -m
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top