PDA

View Full Version : Multiple patches


Philster
10-28-2003, 10:47 AM
Ok, here's the scenario. We have to distribute a CD to our laptop users that will install up to three patches. Of course, this is Microsoft, so each patch will want to reboot. I'd like AMS to do all 3 without user intervention.

I know I can set up runonce, but that will just run the second patch and finish.

What's the best way to handle this?

Gracias in advance.... ;)

TJ_Tigger
10-28-2003, 11:00 AM
Why could you not your ams project write another registry key that identifys where in the setup process it is and then in the Runonce registry setting, have it launch AMS again. Then when AMS launches have it check the registry to see what it needs to setup and then rewrite the runonce key to launch AMS again. This could go on and on until all of your patches were installed..

Write a key

HKEY_LOCAL_MACHINE\SOFTWARE\AMS\patchlvl with a value of 2.

and in the Runonce have it launch AMS again

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\RunOnce (relaunch AMS)

When AMS runs, have it check the first key to figure out what to do next. If the key patchlvl = 2 then install the second patch and set the runonce key again to launch AMS If the key patchlvl = 3 then have it install the third patch and remove the keys as they are no longer necessary.

Philster
10-29-2003, 03:47 PM
I'm checking after the install to make sure the patch is there by checking for the key: HKEY_LOCAL_MACHINE Software\Microsoft\Updates\Windows 2000\SP5\KB23182. I can't seem to get the logic right for the "%DoesKeyExist%". What value does that return? 0 = It's there? 1 = It isn't? True? False? No matter what I use, it's telling me the key isn't there... er... whether it's there or not. :)

TJ_Tigger
10-29-2003, 04:00 PM
From Help it says this

Variable name:
The variable that will hold either TRUE or FALSE depending on whether or not the Registry key exists.

Use all CAPS with the TRUE or FALSE

Philster
10-30-2003, 08:17 AM
Thanks! I'll check that out. I know I tried that... I'm not sure about CAPS and not sure if I used quotes in the comparison. :rolleyes:

Worm
10-30-2003, 09:22 AM
You might check the command line for the update. Create a shortcut and use the command line parameter of /?.

Most of them will let you bypass the reboot prompt. The you could be in control of when you wanted the reboot prompt to show.

Lorne
10-30-2003, 09:45 AM
Originally posted by TJ_Tigger
From Help it says this

Variable name:
The variable that will hold either TRUE or FALSE depending on whether or not the Registry key exists.

Use all CAPS with the TRUE or FALSE

Shouldn't have to. True and false are case-insensitive in 4.0.

You can also substitute 0 for false, and anything else (usually 1) for true.

There's a topic in the helpfile explaining the whole true/false thing in some detail...look for Boolean Values or something along those lines. :)

Philster
10-30-2003, 10:30 AM
1. Thanks Worm! I'm using the /Z switch to keep it from rebooting until the last one (someone beat you to that suggestion by a hair) :) . That's why I'm trying to confirm after each install.

2. Lorne... I've tried 0 and 1 and it says it's not there in any case. I'll try the others and check the logic and path in the registry again.

Thanks, folks!

Phil