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!

Alex99
Posts: 42
Joined: Thu Feb 14, 2013 9:28 am

Unstall with parameters

Hello,
Could you help me such problem? -
Do I have a way to run uninstall with some parameters?
Depper description of problem -
I need to upgrade my product when 4th version number is changed.(for example from 1.0.0.0 to 1.0.0.1) Because of windows installer restriction I can't do it automatically.(4th version number is ignoring)
So I want to do the following -
1) Check allow side by side install
2) When my installer is runnig - check OLDPRODUCTS and if installed product is exists on PC - uninstall it from custom action.
it works, but...
Its upgrade, so I dont want to delete all files while unistalling(for example I dont want to delete license file). So I need somehow say to uninstalled - "Do not touch some files". So I need to pass some parameter to uninstall. Something like "Action Data" of custom action for unstallation process. How can I do this?
NOTE: unistall is running manually from custom action, so I dont have access to sessions property of this process. or not?
Actually if you have an idea how I can run my upgrade in another way - this will be helpful too...

Thanks in advance,
Alex
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Unstall with parameters

Hello,

Please keep in mind that if a resource was not created by your installation package (e.g. it is created through a custom action), then the related file will not be removed during uninstall.

Can you please tell us how your license file is created? It is installed by the install pack or it is created by your application or by a custom action?

Can you also please send us the .AIP (project file) to support at advancedinstaller dot com so we can see how the uninstall is done.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alex99
Posts: 42
Joined: Thu Feb 14, 2013 9:28 am

Re: Unstall with parameters

Hi,
License file included as usual file in "Files And Folders". Actually it doesn't matter what file I don't want to uninstall.
I have another, more important!, problem now -
I set "Allow Side By Side" install option, but when I'm running my installer - I got the error - "Another version installed..."
Upgrading versions - from 1.0.0.0 to 1.0.0.1. I understand that this change is not change Product Code etc...
But I want to start installing anyway. And while installing process I'll uninstall old version in some custom action.
Do I have some way to avoid checking installed version automatically?Or some way to say that "everything is OK" after checking version?

Thanks,
Alex
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Unstall with parameters

Hello,

Please notice that two products with the same ProductCode can not be installed on the same computer. Windows Installer will prevent this with an error: “Another version of this product is already installed[...]” as you mentioned above.

If you select the option “Allow side by side installs of different product versions” this means that you allow different versions of the same application, this means that they have different products code, but since you are changing only the forth number the Advanced Installer won't change the ProductCode.

In order to achieve that, Advanced Installer provides you with the possibility to generate new ProductCodes and UpgradeCodes for your project. This can be done through selecting Project->Options->Project IDs. On this tab you can generate new codes for your project.
Please note this is not a recommended approach.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”