views:

787

answers:

3

I'm trying to configure an installer for some software we use within the company.

The installer is pushed out to target machines via SMS, and it performs the following steps:

  1. Terminate any currently running instances of the app (the app is a utility, so this isn't an impact on the user).
  2. Remove the previous version.
  3. Install the updated version.

What we want it to do is launch the installed executable (as the currently logged in user, not the system account which the SMS job runs as) once step 3 is completed.

I've tried adding a custom action as follows:

<CustomAction Id="Relaunch" Impersonate="yes" Return="asyncNoWait" FileKey="AppExeFile" Execute="commit" ExeCommand="acm" />

And in the InstallExecuteSequence element I have the following:

<Custom Action="Relaunch" OnExit="success" />

However when we try this, either as a SMS job or executing as an administrator nothing happens (e.g. the app isn't relaunched).

Any suggestions?

A: 

The solution I've come up with is to start our utility using the Run registry key at login, and to prevent launching the utility during install if the current user is "SYSTEM" - this wasn't specifically with SMS but using AD/GPO deployment. However some of our customers are using SMS and this was the solution that worked for them.

Similar issues with Vista/Server 2008 UAC, the only reliable solution I've come up with there is to schedule a reboot so that when the user logs back in the utility is launched under the correct user context.

I've done a fair bit of research and looking through MSI documentation and it seems that de-elevating privileges to launch a background utility as another user is not really possible.

sascha
Hmmm I'm not too fond of the 'Require Reboot' flag - it seems like a bad solution to a seemingly simple problem... The utility currently does use the Run key, but its still a case of re-launching.. thanks though.
Matthew Savage
A: 

Unfortunately it would seem this isn't possible - I suppose it might be an option to write an extension for the MSI which does what I need in code some how - although it seems like a lot of work for a little reward.

What we've decided to do is use SMS to send out a chained package - the primary one which executes our application, which first depends on the installer being run.

Hope this helps someone else :)

Matthew Savage
A: 

wix is really a nice website but it shows ads on its website . To remove the ads we need to burn a hole of $120 / year in our pockets. But we can remove wix ads by posting our wix website links to www.wixpremium.info for free . I tried it and recommend it to you

wix premium

related questions