We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

CaMat
Posts: 18
Joined: Wed Jun 22, 2022 11:48 am

Detect from where unistallation is started

Hello,

How I can detect that the unistallation is started from windows "settings -> application and functions" in mantaince dialogs?

Best regards,
Mateusz
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Detect from where unistallation is started

Hello Mateusz,

I am not quite sure I fully understand your scenario here.

However, if what you want to achieve here is to detect whether the uninstlal is done from Control Panel, here is how you can proceed:

- go to "Product Details" page

- check the "Override Windows Instlaler programs list entry" option

- go to "Table Editor" page

- "Registry" table

- modify the "UninstallString" so that you set a property when the Uninstall String is used, e.g.:

Code: Select all

[AI_UNINSTALLER] /x [ProductCode] AI_UNINSTALLER_CTP=1 UNINSTALL_CP="true"
You can then use "UNINSTLAL_CP" property to detect whether the uninstall was done from Control Panel.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
CaMat
Posts: 18
Joined: Wed Jun 22, 2022 11:48 am

Re: Detect from where unistallation is started

Thank you for your reply.

I don't know why, but when I tried your sollution, installer didn't set property UNINSTALL_CP when I'm uninstalling my program from windows "settings -> apps and functions". It's blank.

However, in my scenario I tried checking value of AI_UNINSTALLER_CTP to show/hide controls when a program is installing/uninstalling and it works.

So I think my problem is solved. Thanks.

Best regards,
Mateusz
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Detect from where unistallation is started

You are always welcome, Mateusz!

Glad to hear it worked.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”