Given this backgorund...
- User downloads setup.exe to desktop.
- User runs setup.exe & installs fine.
... How can I differentiate in script between these 2 scenarios:
1. User clicks the Uninstall Shortcut on the start menu OR
Runs uninstall from the Add/Remove CP.
2. User re-runs the setup.exe on the desktop.
It's not clear to me if I can use MAINTENANCE and NEEDSUPGRADE variables to differentiate. Will REMOVE be initialized to TRUE in the case of #1?
Thank you.
How to detect uninstall link launch vs. original setup.exe?
-
- Posts: 5
- Joined: Wed Jul 19, 2006 4:51 pm
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
The uninstall shortcut usually sets REMOVE to TRUE, so it should be pre-selected when the uninstall wizard starts up, and this should give you detection capability.
MAINTENANCE and NEEDSUPGRADE report the installation state of the current product - and not the location where setup is running from. So they won't be of help.
You can then test for the presence of the instance.dat file next to the running setup.exe file using the pre-defined variable $EXEDIR$, this will let you know if you are running the downloaded main setup file or not.
MAINTENANCE and NEEDSUPGRADE report the installation state of the current product - and not the location where setup is running from. So they won't be of help.
You can then test for the presence of the instance.dat file next to the running setup.exe file using the pre-defined variable $EXEDIR$, this will let you know if you are running the downloaded main setup file or not.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 12
- Joined: Thu Feb 13, 2014 12:17 am
Re: How to detect uninstall link launch vs. original setup.e
I am also stuck in the same situation and the solution given in this post is not working for me. The Uninstall shortcut is not setting the REMOVE variable to TRUE.
Since this is an old post may be the current behavior changed now. I am using installaware 18.04
Please let me know how can i differentiate between the two scenarios mentioned by Bob in this post?
Since this is an old post may be the current behavior changed now. I am using installaware 18.04
Please let me know how can i differentiate between the two scenarios mentioned by Bob in this post?
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: How to detect uninstall link launch vs. original setup.e
Dear User,
the easiest way that comes to my mind is,
- try with passing a custom command line parameter with the Uninstall shortcut and then check the presence of that parameter in the "CMDLINE" pre-defined variable from your script.
Regards
the easiest way that comes to my mind is,
- try with passing a custom command line parameter with the Uninstall shortcut and then check the presence of that parameter in the "CMDLINE" pre-defined variable from your script.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
- Posts: 12
- Joined: Thu Feb 13, 2014 12:17 am
Re: How to detect uninstall link launch vs. original setup.e
Is the command line parameter solution going to work when user uninstalls from Control Panel using the Add/Remove?
If not then please provide a generic solution which works in all uninstall scenarios.
If not then please provide a generic solution which works in all uninstall scenarios.
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: How to detect uninstall link launch vs. original setup.e
Unfortunately, It doesn't exist a generic solution that can be used to track from where the Un-install action has been issue.
For sure, when the user select to un-install a package from Control Panel, the REMOVE pre-defined variable will be TRUE ... and you can easily verify this, using a Message-Box to report the variable value, at the very beginning of your main script.
Hope this helps you.
Regards
For sure, when the user select to un-install a package from Control Panel, the REMOVE pre-defined variable will be TRUE ... and you can easily verify this, using a Message-Box to report the variable value, at the very beginning of your main script.
Hope this helps you.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
- Posts: 12
- Joined: Thu Feb 13, 2014 12:17 am
Re: How to detect uninstall link launch vs. original setup.e
Using your suggestions I found a generic solution to set
REMOVE=TRUE MODIFY=FALSE REPAIR=FALSE
in Command Line Parameters of the Uninstall Shortcut.
Now I get REMOVE=TRUE whether user Uninstall from Control Panel or using the shortcut...
Thanks for your help.
REMOVE=TRUE MODIFY=FALSE REPAIR=FALSE
in Command Line Parameters of the Uninstall Shortcut.
Now I get REMOVE=TRUE whether user Uninstall from Control Panel or using the shortcut...

Thanks for your help.
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: How to detect uninstall link launch vs. original setup.e
Happy you solved
!
Regards

Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: Baidu [Spider] and 124 guests