1

Vista requires elevated rights for installers which install drivers or other system items. Pointsec has one of these installers with the problem that the installer itself does not request elevation so the elevation must be granted to it beforehand.

When installing this software to several machines disabling UAC, installing the software and then re-enabling UAC is quite tedious. A way which would take care of UAC would be preferred.

The installer is an MSI package on a network share. The share also has the installation profile which the installer is supposed to find and use in the installation. This works fine without UAC but we have not managed to get this running with UAC.

My main problem is that when elevating the process, it seems to lose its working directory. So while a shortcut to msiexec with correct parameters and the network share as the working directory works (ie. Starts but errors due to no elevation) running this shortcut 'as administrator' complains on not finding the msi package. Process Monitor shows msiexec trying to find the package from Windows\System32. Specifying the full UNC path to the package launches the installer but it fails to find the profile file. So what is the correct way to elevate a windows installer which does not request elevation itself?

Mikko Rantanen
  • 131
  • 1
  • 4

3 Answers3

4

Basically you've got a poorly designed installer.

What you could try is setting the ALLUSERS property in the property table to 1 (using Orca, look for Orca.msi in the Windows Installer SDK) which will force a per-machine installation.

In this case the installer will then request elevation partway through the installation (this is how UAC + MSI is supposed to work) and you should be fine.

saschabeaumont
  • 2,794
  • 22
  • 14
  • I was thinking Orca might provide an answer. I'll give it a try the next day I'm at the office now that I know what needs to be changed. – Mikko Rantanen May 01 '09 at 01:07
0

The post Why is my starting directory ignored when I elevate a command prompt? on Raymond Chen's blog may be relevant here.

I also know that some of the elevation heuristics are very simplistic, e.g. if the file is named "setup" or "install" it will request elevation. I can't find my source for this at the moment.

Not a highly technical answer but perhaps it will be useful.

0

One approach would be to run an elevated command prompt, change the working directory in there and then run the installer from there. Anything launched from an elevated cmd.exe is itself elevated.

Richard Gadsden
  • 3,686
  • 4
  • 29
  • 58