cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
karthic
Level 4

how to set Admin privildege for Msiexec.exe

Hi,

I am creating a Basic msi project. During uninstallation i have to create specific registries in the system. So i created a Custom action(Immediate) and placed in between install execute and install finalize.

The installer works well in XP, but in Windows 2008, when i uninstall from the Shortcut the installation fails at the custom action which of interest.

What i noted is if i use Setup.exe to uninstall, it uninstalls perfectly
If i uninstall throuhg ARP, it uninstalls perfectly.
But when i uninstall through shortcut, it throws error saying registry cannot be created and rollbacks.

To elevate the setup.exe, we have the option to set Required execution level=Administrator in release wizard. But the uninstall shortcut refers to the MSIEXEC.exe. Is there any way to specify the required execution level for Msiexec.exe

I think this problem is due to the split tokens of Vista, but can your plz help me in setting the admin priviledge for launching Msiexec.exe?

Thanks in advance
Labels (1)
0 Kudos
(3) Replies
sandeep_madhu14
Level 6

try the following command:

msiexec /i "path to msi" /qn /a

or

msiexec /a /i "path to msi" /qn

let me know if it is not help full...

Thanks
Madhu
0 Kudos
ChandanOmkar
Level 8

The msiexec elevates itself during the uninstallation, but i think the custom action tries to change the registry before the elevation of msiexec.exe. So you need to change the sequence of your custom action.
or a common work around for this issue is to right click the shortcut and select run as administrator.
0 Kudos
Reureu
Level 10

Here is a list of things that might go wrong on Windows Vista. I reckon the list also applies to Windows 7 and Windows 2008.

http://www.installsite.org/pages/en/msi/articles/VistaMSI/index.htm

I had similar symptoms to yours with my setup a while ago. It was related to the first item in the list above: I had forgotten to add one property to the SecureCustomProperties property.

I hope that helps.
0 Kudos