parkerr
Posts: 10
Joined: Mon Feb 12, 2018 8:30 pm

Custom Actiom VB.NET Action Data (How do identify that an uninstall is taking place)

Hi

I have a VB6 application which I am packaging using AI. I have created a VB.NET dll custom action to set up the Registry for the SQL database connection which has to be verified for existence within the users network. The custom action should do the following based on the action being run by the user and the UILevel

Install
The Custom Installer allows either a UI to be displayed for the input of data base server and database name details or in the case of a quite install use properties I have set up for command line install and not display the UI and still verify the server and use the session.log to report errors with verification. This works perfectly because I pass Action Data in the form of an 'I' and check the UILevel and the Properties are coming through as properties within session.item.

Maintenance
I am still developing this process

Uninstall
The custom installer checks the Action Data for 'X' and then deletes the registry entries. This is where I am having the following problems

1. Action Data has nothing in it
2. Is there a Session item or some other variable I can access that tells the Custom Action that it is an uninstall. I will also need this to available in quiet
mode. I am using the attach function to debug the code and I have been going through the session properties and I cant find anything that Identifies
that an uninstall is being run. I found the following MS items REMOVE = 'MainFeature' ACTION = 'Install' INSTALLLEVEL = '3' and I presume from
Advanced Installer AI_INSTALL_MODE = 'Remove'

The Custom Action is 'Call Function From Attached Native DLL' and Immediately is set. 'Uninstall' and 'Regular Uninstall' are ticked, I have attached a screen shot of the Custom Action settings and Properties.


Also is there a list of AI properties like AI_INSTALL_MODE and what information they hold and what the information means for example in AI_INSTALL_MODE does Remove mean Uninstall or does just Remove the listed components that may be in another property.

I have a professional license and I am using AI 21.3.1

Thank you in advance for your kindness and understanding while trying to help me with this issue

Cheers
Rob
Attachments
Properties Variables
Properties Variables
Properties Variables.jpg (75.53 KiB) Viewed 6580 times
Custom Action settings
Custom Action settings
Custom Action settings.jpg (139.92 KiB) Viewed 6580 times
Liviu
Posts: 1048
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Custom Actiom VB.NET Action Data (How do identify that an uninstall is taking place)

Hello Rob,

As I see, my colleague Eusebiu has replied to you over the email.

Please continue the conversation there to avoid duplicate threads.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”