PDA

View Full Version : Batch Script .....


-=DoW=- The Fan
August 2nd, 2005, 03:39
I am creating a CD that runs SP2 Update, then follows with most of the rest of the updates afterwards.


This is my batch file to run the other updates .....

@echo off
start /wait d:\updates040505\englishupdates\KB873333 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB873339 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB885250 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB885835 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB885836 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB886185 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB887472 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB887742 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB888113 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB888302 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB890175 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB890859 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB890923 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB891781 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB893066 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB893086 -n -o -z -q
start /wait d:\updates040505\englishupdates\KB890830 -n -o -z -q
@echo on

PAUSE

I need the following, but i dont know whether its possible .....

d:\ is not always the CDRom drive.

So...

I need something in there that sets the CDRom drive, or reads the Variable that IS the cdrom drive, and then intgrates it into the batch file to read similar to this ......

start /wait %cdrom%:\updates040505\bla\ba


Also, i would like to set a registry "runonce" command using Autoplay Menu so that I can install SP2, then as soon as the PC restarts, it runs the update.bat file



Is all this possible.

I got most of my CD running, its the tweaking bit that annoys a little



Thanks for your help guys :-)

Warcuddle
August 2nd, 2005, 04:37
hmm not that good in batch files but i think

start /wait %cdrom%:\updates040505\bla\ba supposed to be
start /wait %cdrom%\updates040505\bla\ba
i left the ":" so mayby the computer automaticly adds a ":" after the "drive" .
I'm not sure but ill take a closer look at this problem.

Ill have a answer ASAP