sdm10101
Posts: 35
Joined: Wed May 06, 2009 2:13 pm

Uninstall - custom actions

I’m having trouble with custom actions during uninstallation of my application.

Firstly, the property that I’d like to ‘send’ to my vbscript is the application directory (formatted as [ProgramFilesFolder][Manufacturer]\[ProductName] as per the Product Details view).
This is not getting passed to my script. How is this achieved? I assume the property should be deferr3d as well as the action?

Secondly, having done a first install with this erroneous uninstall custom action in the msi, I cannot now uninstall. How do I get round this? Is there a way to force Advanced Installer to use the newly built msi rather than the one used for the currently installed application?

Thanks
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Re: Uninstall - custom actions

Hi,
Firstly, the property that I’d like to ‘send’ to my vbscript is the application directory (formatted as [ProgramFilesFolder][Manufacturer]\[ProductName] as per the Product Details view).
This is not getting passed to my script. How is this achieved? I assume the property should be deferr3d as well as the action?
1. The property that holds the installation directory is called APPDIR and it's default value is configured in the Product Detail view. So in order to obtain the install directory you should use this property.

2. You cannot directly access properties from deferred custom actions. To fix this you should set the custom action to be execute as immediate or use the "Action Data" field. Any values entered in that field will be passed to the deferred custom action through the CustomActionData property. This property can be retrieved as a regular property inside Deferred custom actions.

http://msdn.microsoft.com/en-us/library ... S.85).aspx
Secondly, having done a first install with this erroneous uninstall custom action in the msi, I cannot now uninstall. How do I get round this? Is there a way to force Advanced Installer to use the newly built msi rather than the one used for the currently installed application?
You can use the Windows Installer Cleanup Utility to remove the package.
http://support.microsoft.com/kb/290301

Best regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com
sdm10101
Posts: 35
Joined: Wed May 06, 2009 2:13 pm

Re: Uninstall - custom actions

Thanks for your swift response.

I'm still having issues with the custom action.
I've got rid of the PropetrySource that I was originally using.
I've added [APPDIR] to the action data field.
I'm accessing the property in my vbscript using Session.Property("APPDIR").

But my property is still blank. What am I missing here?
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Re: Uninstall - custom actions

Hi,
I'm accessing the property in my vbscript using Session.Property("APPDIR").
You should not retrieve the APPDIR property but CustomActionData. It will contain the value of APPDIR.

Code: Select all

Session.Property("CustomActionData")
Regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com
sdm10101
Posts: 35
Joined: Wed May 06, 2009 2:13 pm

Re: Uninstall - custom actions

Thanks. I mis-read that bit.

Return to “Common Problems”