Is there any well to tell if setup.exe was launched from Add/Remove programs? Our application requires this when using Windows 2003. I have noticed that program mhsta.exe starts when you open the Add/Remove applet but that doesn't guarantee that the user actually started setup from there.
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Setup started from Add/Remove
Started by
samsquared
, Aug 17 2005 15:06
6 replies to this topic
Posted 17 August 2005 - 15:53
This is a quick answer off the top of my head, but it should give you a route to travel.
When the setup is launched from Add/Remove Programs the first thing that will occur is the framework will check to see if this installer has run before. I believe it does this by checking the <PROGRAMFILES>\Installshield Installation Information\<Your Project GUID> directory. So you could check for the presence of that directory to verify it's been run on that machine previously.
However, if that is not enough (knowing it's been run before) the IS script follows the OnBegin(), OnMaintUIBefore(), OnMaintUIAfter() path. In either OnBegin() or OnMaintUIBefore() you could check the CMDLINE variable. I know both modify, repair, and uninstall options from the Add/Remove applet put something into that variable, but am unsure what those are.
Hope that helps
When the setup is launched from Add/Remove Programs the first thing that will occur is the framework will check to see if this installer has run before. I believe it does this by checking the <PROGRAMFILES>\Installshield Installation Information\<Your Project GUID> directory. So you could check for the presence of that directory to verify it's been run on that machine previously.
However, if that is not enough (knowing it's been run before) the IS script follows the OnBegin(), OnMaintUIBefore(), OnMaintUIAfter() path. In either OnBegin() or OnMaintUIBefore() you could check the CMDLINE variable. I know both modify, repair, and uninstall options from the Add/Remove applet put something into that variable, but am unsure what those are.
Hope that helps
There is great chaos under heaven, and the situation is excellent. (Mao Tse Tung)
Posted 17 August 2005 - 17:13
Thanks for your reply but what I'm trying to determine relates to installing my application for the first time (for maintenance mode it doesn't matter how it's launched).
I need a way to tell if the user has started my install from Add/Remove; if not I need to abort the install.
I need a way to tell if the user has started my install from Add/Remove; if not I need to abort the install.
Posted 17 August 2005 - 21:56
How do you get your setup listed in Add/Remove Programs before it is installed the first time?
Stefan Krüger
InstallSite.org twitter facebook
Posted 18 August 2005 - 01:47
Stefan, you can hit "Add New Programs" and point to a setup program on a CD/floppy.
However, I don't see why this would be a requirement as it leads to the same thing in the end.
However, I don't see why this would be a requirement as it leads to the same thing in the end.
Posted 18 August 2005 - 15:08
It does make a difference to our application, possibly because of the COM+ components or the fact that it's installed using Remote Desktop / Terminal Services.