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

Detect from where unistallation is started

Wed Jun 29, 2022 10:41 am

Hello,

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

Best regards,
Mateusz

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Detect from where unistallation is started

Wed Jun 29, 2022 12:21 pm

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

Fri Jul 01, 2022 12:55 pm

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: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Detect from where unistallation is started

Fri Jul 01, 2022 1:07 pm

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”