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

Launching executables from MSI Installs


5 replies to this topic

rajkulkarni

rajkulkarni
  • Full Members
  • 44 posts

Posted 02 June 2011 - 14:52

I have created an msi installation with Installshield 2011. With one minor hitch I am able to deploy it using Windows 2008 GPO to a domain user.

The problem occurs at the end of the installation where I have it launch an executable (VC++ redistributable). An error message pops up saying the user doesn't have administrative privileges to run that executable file. Is there a way around this?

I could install with elevated privileges, but I would prefer not to do that.

If I try to install the VC++ redistributable as an Installshield prerequisite, I am not able to create an MSI installation file. A setup launcher is required to install prerequisites. I am not able to deploy installations created with a setup launcher.

Any ideas?

MSIYER

MSIYER
  • Full Members
  • 90 posts

Posted 04 June 2011 - 11:48

If I try to install the VC++ redistributable as an Installshield prerequisite, I am not able to create an MSI installation file. A setup launcher is required to install prerequisites. I am not able to deploy installations created with a setup launcher.
Use the appropriate merge module in this case.

I could install with elevated privileges, but I would prefer not to do that.
But installation of vcredist, via exe or merge module, will need admin privileges. There is no workaround.

Workaround through other approaches:
Using MFC as Static Library in the application. Although this increases size of the app, in the end you would not need the vcredist. This is when it only depends on MFC.
But similar step can be taken for other run-time libraries.

Look at this for advanced info:
http://msdn.microsof...-US,VS.80).aspx

Edited by MSIYER, 04 June 2011 - 11:49.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 June 2011 - 10:03

If you need to run an executable from a custom action with elevated privileges, the custom action must be scheduled "deferred in system context" and sequenced between InstallInitialize and InstallFinalize in the InstallExecute sequence.

MSIYER

MSIYER
  • Full Members
  • 90 posts

Posted 11 June 2011 - 10:46

Stefan:
Please correct me if I am wrong.
I feel launching vcredist.exe in the "deferred in system context" will not be successful as the msiexec.exe server process would already be busy with the base product installation and the mutex would not allow the vcredist installation to happen.
UI Sequence is where we can invoke vcredist synchronously, wait for it to finish and then proceed with base product install.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 14 June 2011 - 11:17

QUOTE
I feel launching vcredist.exe in the "deferred in system context" will not be successful as the msiexec.exe server process would already be busy with the base product installation and the mutex would not allow the vcredist installation to happen.
I didn't analyze the vcredist.exe. If it is a msi setup indide, then you are right, it won't work thatw ay. Thanks for mentioning this.

QUOTE
UI Sequence is where we can invoke vcredist synchronously, wait for it to finish and then proceed with base product install.
The UI sequence typically runs with restricted permissions. And in a silent setup (or basic UI) it will be skipped alltogether.

So the recommended solution would be a prerequisite.

MSIYER

MSIYER
  • Full Members
  • 90 posts

Posted 14 June 2011 - 13:07

Thank you Stefan.

vcredist.exe is a self-extracting exe that installs VC++ runtime library redistributables through an msi package.