views:

26

answers:

2

I need to prevent of running Installer.Commit method in my CustomActions managed code. If I just do nothing inside overrided Commit method, it still commits (it creates an element in Programs and Features list) and I don't want that.

If I say base.Commit(null) it stops, but popups an error. How can I do this silently without any messages?

Can I change savedState somehow so it wouldn't actually commit the installation?

A: 

In this case I haven't found any solution but deleting the registry entries right after Commit().

I've deleted all the keys in

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\Products where UninstalString value contains ProductCode (GUID of the app)

I also deleted a key from HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall where the SubKey name == ProductCode

I guess there is something left. I'm not sure.

Ike
+1  A: 

The commit isn't what is responsible for publishing your product to ARP. Windows Installer does this via the PublishProduct standard action and you could disable it using the ARPSYSTEMCOMPONENT property except that the installation authoring tool that you are using doesn't actually expose this ( or just about anything else MSI can do ).

http://msdn.microsoft.com/en-us/library/aa367750(v=VS.85).aspx

If you want to have a high quality installer you shouldn't use VDPROJ or InstallUtil / InstallerClass custom actions.

Christopher Painter