Silent Uninstall - Advanced Installer Community
DiegoCP
Posts: 139
Joined: Fri Jan 23, 2015 1:02 pm

Silent Uninstall

Hello,

I have application.exe which i have been able to silently install using this command line.

application.exe /qn CURRENCY="USD"

but when i try something like

application.exe /x /qn KEEPCONF="Yes"

i doesn't also tried in many ways /uninstall etc.. it doesn't work.


How can i uninstall silently while also setting Properties for my uninstalation.

Thank You for your Help!

Best Regards,
Diego.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Silent Uninstall

Hello,

Please note that the boostrapper uses the Reduced UI (/qr) command line to launch the uninstall process of the .MSI. That means no modal dialog box displayed at the end of the installation.
The passed /qn command line switch is ignored.

Instead, you should use the following command line if you want to silently uninstall the package and set a property:

Code: Select all

msiexec /x {ProductCode} /qn KEEPCONF="Yes"
You could find the product code of your package in "Product Details" page, "Product IDs" tab.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DiegoCP
Posts: 139
Joined: Fri Jan 23, 2015 1:02 pm

Re: Silent Uninstall

Hello Sorin,

Thank You very much!

I will test this.


Best Regards,
Diego.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Silent Uninstall

Hello Diego,

You are welcome. Please let me know if you have any other questions.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DiegoCP
Posts: 139
Joined: Fri Jan 23, 2015 1:02 pm

Re: Silent Uninstall

Hello,

Sorry one more question how can i set via silent installation,

if is it to install for allUsers or for currentUser only?

do i use AllUsers property? i need to this to specify the install path since allUsers is set to ProgramFiles and currentUsers is set to user User AppData Local Folder.


Thank You for your support!


Best Regards,
Diego.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Silent Uninstall

Hello,

You could set "AI_InstallPerUser" property from "InstallTypeDlg". The value for Per User install is 1 and for Per Machine install is 0.
Please take a look on this article : How do I make the package install per-user or per-machine?

Also for silent install you should manually call the "AI_AuthorSinglePackage" custom action in the "Install Execution Stage". Just go to "Custom Actions" page and add a "Call Function From Attached Native DLL" custom action with sequence, scheduled after "Install Execution Stage -> Searches" action group, like this:
Attached DLL: C:\Program Files (x86)\Caphyon\Advanced Installer <version>\custact\x86\aicustact.dll
Function: AI_AuthorSinglePackage

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DiegoCP
Posts: 139
Joined: Fri Jan 23, 2015 1:02 pm

Re: Silent Uninstall

Hello,

i'm not sure i understand it very well.

I already have the InstallTypeDlg.

Do i need to use the AI_InstallPerUser like this?

Application.exe /qn AI_InstallPerUser="1" ?


can't i just set the AllUsers property?

Thank You for your Help!


Best Regards,
Diego
DiegoCP
Posts: 139
Joined: Fri Jan 23, 2015 1:02 pm

Re: Silent Uninstall

Hello,

i have added the custom action

and now this

application.exe /qn AI_InstallPerUser="1"

works great!

Thank You!

Best Regards,
Diego.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Silent Uninstall

Hello,

You are welcome! Please let me know if you have any other questions.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”