This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Vista/Windows 7 requireAdministrator vs "run as administrator"
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jan 19, 2010
01:16 PM
Vista/Windows 7 requireAdministrator vs "run as administrator"
I am wondering if anyone can help here.
I have a file that I am registering during an installation. It fails on Windows 7/Vista because of a permission issue.
There is a documented discrepancy between something with requireAdministrator defined in its manifest and the right-click & "run as administrator" option. There are some highest order permissions reserved only for the actual administrator account that requireAdministrator doesn't have.
In my setup the file is trying to access some reserved registry area and pops up an error under "requireAdministrator". If you register it directly from "run as administrator" however things work.
Is there any way via command line (setup.ini/otherwise) to automatically launch the setup with "run as administrator".
Alternatively, is there any way to detect if "run as administrator" was used and notify users (perhaps make this a root install condition and notify/exit if its not satisfied). I looked into [LogonUser] but it doesn't change.
If anyone has a tip it would be great - I might be just asking for too much here.
I have a file that I am registering during an installation. It fails on Windows 7/Vista because of a permission issue.
There is a documented discrepancy between something with requireAdministrator defined in its manifest and the right-click & "run as administrator" option. There are some highest order permissions reserved only for the actual administrator account that requireAdministrator doesn't have.
In my setup the file is trying to access some reserved registry area and pops up an error under "requireAdministrator". If you register it directly from "run as administrator" however things work.
Is there any way via command line (setup.ini/otherwise) to automatically launch the setup with "run as administrator".
Alternatively, is there any way to detect if "run as administrator" was used and notify users (perhaps make this a root install condition and notify/exit if its not satisfied). I looked into [LogonUser] but it doesn't change.
If anyone has a tip it would be great - I might be just asking for too much here.
(3) Replies
‎Jan 20, 2010
01:29 AM
Which project type do you talk about? And how do you register the file? I presume it´s a COM dll.
If it´s a Basic MSI project there is normally no need to request elevated privileges during the UI sequence. Just make sure that the MSI package requires admin privileges for the execute sequence (default setting for a Basic MSI project).
And if you have not read this document.
If it´s a Basic MSI project there is normally no need to request elevated privileges during the UI sequence. Just make sure that the MSI package requires admin privileges for the execute sequence (default setting for a Basic MSI project).
And if you have not read this document.
‎Jan 20, 2010
03:39 PM
I looked into it more. THe registration routine (regsvr32 of a com dll) is trying to write/modify a key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\xyz\ which is not permitted even in elevated mode.
Only with Run As Administrator. I've talked around with some people and we believe we need to send this one back to the offending developer to look at more - sounds like W7 is stopping us for mucking where we do not belong anyways.
Only with Run As Administrator. I've talked around with some people and we believe we need to send this one back to the offending developer to look at more - sounds like W7 is stopping us for mucking where we do not belong anyways.
‎Jan 21, 2010
11:08 AM
As an aside, Windows Installer will automatically ignore such keys that are protected by WRP, when they're represented in a table instead of through self-registration. This is another benefit to COM Extraction, if it works for your COM DLL. (Oh, and if you're using an MSI-based project; that wasn't clear in your posts.)