Jump to content


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.
Photo

Setup started from Add/Remove


6 replies to this topic

samsquared

samsquared
  • Full Members
  • 18 posts

Posted 17 August 2005 - 15:06

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.

Xitch13

Xitch13
  • Members
  • 134 posts

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
There is great chaos under heaven, and the situation is excellent. (Mao Tse Tung)

samsquared

samsquared
  • Full Members
  • 18 posts

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.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 17 August 2005 - 21:56

How do you get your setup listed in Add/Remove Programs before it is installed the first time?

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

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.
user posted image

samsquared

samsquared
  • Full Members
  • 18 posts

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.

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 19 August 2005 - 00:25

If you say so then samsquared.
user posted image