Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Supressing a Reboot for Active Setup initiated repairs

Updated: 21 May 2010 | 5 comments
Locoblade's picture
+1 1 Vote
Login to vote

Hi All

Long time no post on a WPS forum.

Anyway, I've written a small MSI from scratch that runs some Wisescript to clean up an old application we had installed that doesn't cleanly uninstall itself.

There are machine specific parts that get cleaned up by the main Installation which requires a reboot at the end, but also I need to clean up registry entries in HKCU. Ive used an active setup trigger to run a seperate piece of wisescript that cleans these keys out, but I have a problem in that the MSI then reboots the machine following this.

Can anyone advise how I might configure the MSI so that it will reboot when first installed, but won't reboot when it does the user based healing via active setup? I have tried putting "REBOOT = FORCE" as a custom action only to be run IF NOT Installed, but it still seems to reboot it every time a new user logs onto the machine.

thanks
Chris

discussion Filed Under:

Comments

Eshwar's picture
20
Feb
2009
1 Vote +1
Login to vote

how about a vbscript to delete HKCU entries part

I always use vbscript to perform deletion, especially using active setup.
Write a vbscript to delete your HKCU entries and copy it to the machine before reboot. Give the path of the vbscript in Active Setup.
So when you delete HKLM entrie and reboot, active setup triggers vbscript which will delete HKCU entries.

Add vbscript + Active setup entries [with path to vbscript] to your main MSI and let it cleanup the install, delete HKLM entries and reboot. Once you reboot the machine, vbscript will take care of the rest.

Let me know if you need any assistance with the vbscript.

Thanks,
Eshwar

Thanks,
Eshwar

Locoblade's picture
20
Feb
2009
0 Votes 0
Login to vote

Thanks EshwarIts possibly me

Thanks Eshwar

Its possibly me thats actually misunderstanding how active setup works then, because in my eyes my Wisescript exe that cleans up the HKCU keys should do the same as what your VBScript does?

In my active setup StubPath key I'm calling the exe directly, not doing a repair of the MSI itself, so thinking about it as Im typing is the MSI actually running at all, is it not simply the Exe that's firing off, completely independant of the MSI?

If thats the case, I need to find out what is causing this reboot. Unfortunately having been experimenting this morning, its not replicated on my virtual machines that I use for basic testing, which suggests its perhaps a combination of what my MSI is doing and something present/different in the live environment.

Chris

Eshwar's picture
20
Feb
2009
1 Vote +1
Login to vote

check your wise script EXE

Did you check your wise script EXE if there is any custom that is triggering the reboot?

Coz when the user logins in for the first time, active setup registry entry [stubpath] will be executed, which will execute the wise EXE that you've specified.

Thanks,
Eshwar

Locoblade's picture
20
Feb
2009
0 Votes 0
Login to vote

Yup I did check but it

Yup I did check but it doesn't do anything like that, literally all the exe consists of is a few "edit registry" lines that remove some HKCU keys related to the app we've removed. They all live in HKCU\Software\App so couldnt be triggering a reboot by removing them I wouldnt think.

The more I think about it, the more Im convinced its not my removal tool thats actually triggering the reboot, so I'll have to find some more live guinea pig machines I can run it on to see if I can determine the actual cause.

Chris

EdT's picture
23
Feb
2009
0 Votes 0
Login to vote

Check the application event

Check the application event log to see if your active setup's cleanup might be "damaging" another MSI installation's registry keys, leading to a self healing operation on the other MSI, and a forced reboot. The application event log records any MSI installs, repairs, etc, and is an often overlooked source of diagnostic information.

Also, you could enable verbose MSI logging through the registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer]
"Logging"="voicewarmup"

This will record a log in the temp folder for any MSI install/repair activity. Clear your temp folder of any existing rubbish before you start, so that it is easier to identify any new content.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.