cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tt33333
Level 3

Installscript project

I need to reproduce the "Completely uninstall old setup before installing new setup" installscript MSI/basic MSI feature in installscript project? Basically I want user to run the setup once and if its installed it runs the uninstall and automatically launch setup for new version.

I was able to detect if it's MAINTENANCE mode and uninstall but don't know how to automatically launch setup for new version.

Really appreciate any help.
Thanks
Labels (1)
0 Kudos
(3) Replies
tt33333
Level 3

tt33333 wrote:
I need to reproduce the "Completely uninstall old setup before installing new setup" installscript MSI/basic MSI feature in installscript project? Basically I want user to run the setup once and if its installed it runs the uninstall and automatically launch setup for new version.

I was able to detect if it's MAINTENANCE mode and uninstall but don't know how to automatically launch setup for new version.

Really appreciate any help.
Thanks


I've tried calling setup functions after uninstall/Maintenance by doing this:
OnMaintUIAfter();
OnFirstUIBefore();
OnMoveData();
OnFirstUIAfter();

It runs setup but doesn't copy the files. It doesn't execute "OnInstallingFile".
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

You can call the UninstallApplication function which will read the uninstall string from the registry for the uninstall key specified and then launch the uninstall for you. If additional control is needed, you can also read the uninstall string of the old installation with the registry functions and then manipulate and launch the uninstall string value with LaunchApplication.
0 Kudos
tt33333
Level 3

I got "Another instance of this setup is already running" if I try unistalling during installation.


joshstechnij wrote:
You can call the UninstallApplication function which will read the uninstall string from the registry for the uninstall key specified and then launch the uninstall for you. If additional control is needed, you can also read the uninstall string of the old installation with the registry functions and then manipulate and launch the uninstall string value with LaunchApplication.
0 Kudos