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

How do determine where setup.exe is?


1 reply to this topic

cowboy3398

cowboy3398
  • Members
  • 2 posts

Posted 13 September 2005 - 18:59

I'm using InstallShield Developer 7.0 SP 4.

During the installation process I need to execute another 3rd party installer which will not allow another installer to be active at the same time.

To work around this problem, I execute a small launcher which waits for my installer to exit, and then launches the 3rd party installer.

I have 2 situations which can occur:
- the 3rd party installer may cause a reboot.
- the 3rd party installer returns control back to the launcher

Here's my question:

How do I determine where my original setup.exe (it is downloaded and could be placed anywhere) was executed from?

This way I could set a registry entry for runonce if the reboot occurs, or I can restart the installer if there wasn't a reboot.


cowboy3398

cowboy3398
  • Members
  • 2 posts

Posted 13 September 2005 - 23:34

biggrin.gif A solution has been found

This information was cut/paste from here:
http://www.installsh...SetupExeDir.asp


// global variable to store SETUPEXEDIR property value
STRING SETUPEXEDIR[MAX_PATH + 1];

function OnBegin( )
NUMBER nBuffer; // local buffer-size variable
begin

if (!MAINTENANCE) then // available only during a first-time installation
nBuffer = MAX_PATH + 1; // initialize size buffer before calling MsiGetProperty
MsiGetProperty(ISMSI_HANDLE, "SETUPEXEDIR", SETUPEXEDIR, nBuffer);

// for testing: display the variable's value
MessageBox("SETUPEXEDIR = " + SETUPEXEDIR, INFORMATION);
endif;

end;

Because the variable SETUPEXEDIR is a global variable, you can use its value in any later event-handler function.