Merging reg files as a standard User without UAC prompt ?
I need to merge reg files as a standard user. When I run regedit.exe as a standard user, I get an UAC prompt, thanks to the manifest file embedded in the .exe which requires privilieges elevation. I would like to run regedit.exe as a standard user, without UAC prompt, to merge some .reg files in the HKEY_CURRENT_USER path (standard user has permissions to do so). How could I do it ? (I tried a dirty way to do so : Icopied regedit.exe from Windows XP to an user folder on my Vista machine, and it works. It runs silently (after setting the compatibility mode to "Windows XP SP2") and merge correctely my reg file.) Thanks in advance, Thomas. More info about manifest files : http://channel9.msdn.com/Showpost.aspx?postid=209647http://blogs.msdn.com/uac/ You can easily check this by viewing regedit.exe with notepad for example. Near the end of the exe, you will see this XML part : <!-- Copyright (c) Microsoft Corporation --><assembly xmlns="urnchemas-microsoft-com:asm.v1" manifestVersion="1.0"><assemblyIdentity processorArchitecture="x86"version="1.0.0.0" name="Microsoft.Windows.Regedit" type="win32" /><description>Registry Editor</description><dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" processorArchitecture="x86" /> </dependentAssembly></dependency><trustInfo xmlns="urnchemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="highestAvailable" uiAccess="false" /> </requestedPrivileges> </security></trustInfo></assembly>
April 4th, 2007 8:56am

I found the solution. We have to use ACT5.0. Inside the ACT, there is "Compatibility Administrator" which is used to create compatibility fix database. I created a compatibility fix database for regedit.exe in C:\Windows and checked the fix "RunAsInvoker". After saving the sdb file and importing with C:\Windows\sdbinst.exe, regedit is now launched without UAC prompt. (see Step Six: Run the Compatibility Administrator program to create an application compatibility fix database. http://technet2.microsoft.com/WindowsVista/en/library/00d04415-2b2f-422c-b70e-b18ff918c2811033.mspx?mfr=true) Thomas.
Free Windows Admin Tool Kit Click here and download it now
April 4th, 2007 9:18am

Weird. I don't get a UAC elevation if I try to run Regedit as a Standard User. And if you check the manifest (as per your example above) you still shouldn't get a UAC elevation since the requestedExecutionLevel is set to highestAvailable, which should only give a UAC prompt if you are logged in as an Administrator.
April 4th, 2007 11:31am

Thanks for your message. Very weird indeed.... I tested on an other machine and it works as you described : no prompt for standard user. I am still investigating why am I getting this prompt...
Free Windows Admin Tool Kit Click here and download it now
April 16th, 2007 12:24pm

Hi Thomas, Did you ever resolve this issue? I have encountered the same problem and I think it is a result of a security policy. When I logon to a workstation outside of out policy OU, I am not prompted for UAC when I run regedit but when I move the same PC into our OU that gets policies I am prompted by UAC when I run regedit as both a standard user and an administrator.
January 10th, 2008 2:23am

I have the same issue. Elevation is blocked for standard users and administrators automatically get elevated by our policy. I am having a hard time figuring out why regedit still won't run as a standard user!!!
Free Windows Admin Tool Kit Click here and download it now
April 28th, 2010 9:59pm

Is there anyway to run regedit.exe as a standar user? I have my group policy set to • Automatically deny elevation requests for User Account Control: Behavior of the elevation prompt for standard users. This simply gives me "This program is blocked by group policy" On Windows 7.
September 26th, 2011 9:59pm

Convert them to a VBSscript or a batfile (it appears Reg.exe doesn't honour this setting). VBS Dim Sh Set Sh = WScript.CreateObject("WScript.Shell") Sh.RegDelete "HKCU\Software\ACME\" WshShell.RegWrite "HKCU\Software\ACME\FortuneTeller\", 1, "REG_BINARY" Batch Forhelp and examples type reg add /? -- .. -- "bjohnrini" wrote in message news:cbf09759-a94f-44ee-88de-0bc762fcc5f8... > Is there anyway to run regedit.exe as a standar user? > > I have my group policy set to Automatically deny elevation requests for > User Account Control: Behavior of the elevation prompt for standard users. > > This simply gives me "This program is blocked by group policy" > > On Windows 7. >
Free Windows Admin Tool Kit Click here and download it now
September 27th, 2011 3:15am

You could edit the application manifest (they are known by the number 24) embedded in the application. You use ResHacker (http://www.angusj.com/resourcehacker/) to export the manifest, edit it, and then replace the embedded manifest with the edited one. But on Vista the manifest seemsto allow execution by nonadmins. It's listed as <requestedExecutionLevel level="highestAvailable" uiAccess="false" /> and according to http://msdn.microsoft.com/en-us/library/bb756929.aspx it means highestAvailable The application runs with the highest privileges the current user can obtain. Experiment and see what happens if you change it to AsInvoker. To edit Regedit you'll need to give yourself permission to change c:\windows\regedit.exe Click Start - All Programs - Accessories - Right click Command Prompt and choose Run As Administrator. Type takeown /f c:\windows\regedit.exe /a icacls c:\windows\regedit.exe /grant Administrators:f -- .. -- "DavidMCandy" wrote in message news:58f05c55-c6ac-4762-aad2-011ff129ec24... > Convert them to a VBSscript or a batfile (it appears Reg.exe doesn't > honour > this setting). > > VBS > > Dim Sh > Set Sh = WScript.CreateObject("WScript.Shell") > Sh.RegDelete "HKCU\Software\ACME\" > WshShell.RegWrite "HKCU\Software\ACME\FortuneTeller\", 1, "REG_BINARY" > > > Batch > > Forhelp and examples type > reg add /? > -- > .. > -- > "bjohnrini" wrote in message news:cbf09759-a94f-44ee-88de-0bc762fcc5f8... >> Is there anyway to run regedit.exe as a standar user? >> >> I have my group policy set to Automatically deny elevation requests >> for >> User Account Control: Behavior of the elevation prompt for standard >> users. >> >> This simply gives me "This program is blocked by group policy" >> >> On Windows 7. >> > >
September 27th, 2011 3:40am

And I've had another thought Edit the registry and change HKEY_CLASSES_ROOT\regfile\shell\open\command to reg import "%1" Reg will import regfiles. HKEY_CLASSES_ROOT is a registry key that is composed of merging the following two keys. HKEY_CURRENT_USER\Software\Classes and HKEY_LOCAL_MACHINE\SOFTWARE\Classes with entries in HKEY_CURRENT_USER overriding entries in HKEY_LOCAL_MACHINE. So to specifically edit for the current user only edit HKEY_CURRENT_USER and for all users (that don't have a user entry) HKEY_LOCAL_MACHINE. EG HKEY_CURRENT_USER\Software\Classes\regfile\shell\open\command and HKEY_LOCAL_MACHINE\SOFTWARE\Classes\regfile\shell\open\command -- .. -- "DavidMCandy" wrote in message news:4d9feb10-65cb-4b9b-ab3b-627692973523... > You could edit the application manifest (they are known by the number 24) > embedded in the application. You use ResHacker > (http://www.angusj.com/resourcehacker/) to export the manifest, edit it, > and > then replace the embedded manifest with the edited one. > > But on Vista the manifest seemsto allow execution by nonadmins. It's > listed > as > <requestedExecutionLevel > > level="highestAvailable" > > uiAccess="false" > > /> > > and according to http://msdn.microsoft.com/en-us/library/bb756929.aspx it > means > > highestAvailable > The application runs with the highest privileges the current user can > obtain. > > Experiment and see what happens if you change it to AsInvoker. > > To edit Regedit you'll need to give yourself permission to change > c:\windows\regedit.exe > > Click Start - All Programs - Accessories - Right click > Command Prompt and choose Run As Administrator. Type > > takeown /f c:\windows\regedit.exe /a > icacls c:\windows\regedit.exe /grant Administrators:f > > > -- > .. > -- > "DavidMCandy" wrote in message > news:58f05c55-c6ac-4762-aad2-011ff129ec24... >> Convert them to a VBSscript or a batfile (it appears Reg.exe doesn't >> honour >> this setting). >> >> VBS >> >> Dim Sh >> Set Sh = WScript.CreateObject("WScript.Shell") >> Sh.RegDelete "HKCU\Software\ACME\" >> WshShell.RegWrite "HKCU\Software\ACME\FortuneTeller\", 1, "REG_BINARY" >> >> >> Batch >> >> Forhelp and examples type >> reg add /? >> -- >> .. >> -- >> "bjohnrini" wrote in message news:cbf09759-a94f-44ee-88de-0bc762fcc5f8... >>> Is there anyway to run regedit.exe as a standar user? >>> >>> I have my group policy set to Automatically deny elevation >>> requests >>> for >>> User Account Control: Behavior of the elevation prompt for standard >>> users. >>> >>> This simply gives me "This program is blocked by group policy" >>> >>> On Windows 7. >>> >> >> > >
Free Windows Admin Tool Kit Click here and download it now
September 27th, 2011 4:04am

WshShell.RegWrite "HKCU\Software\ACME\FortuneTeller\", 1, "REG_BINARY" should read Sh.RegWrite "HKCU\Software\ACME\FortuneTeller\", 1, "REG_BINARY" another example omits the type so it defaults to a string Sh.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\RegisteredOrganization", "My Company" Here's a list of types String REG_SZ String REG_EXPAND_SZ Integer REG_DWORD Integer REG_BINARY -- .. -- "DavidMCandy" wrote in message news:58f05c55-c6ac-4762-aad2-011ff129ec24... > Convert them to a VBSscript or a batfile (it appears Reg.exe doesn't > honour > this setting). > > VBS > > Dim Sh > Set Sh = WScript.CreateObject("WScript.Shell") > Sh.RegDelete "HKCU\Software\ACME\" > WshShell.RegWrite "HKCU\Software\ACME\FortuneTeller\", 1, "REG_BINARY" > > > Batch > > Forhelp and examples type > reg add /? > -- > .. > -- > "bjohnrini" wrote in message news:cbf09759-a94f-44ee-88de-0bc762fcc5f8... >> Is there anyway to run regedit.exe as a standar user? >> >> I have my group policy set to Automatically deny elevation requests >> for >> User Account Control: Behavior of the elevation prompt for standard >> users. >> >> This simply gives me "This program is blocked by group policy" >> >> On Windows 7. >> > >
September 27th, 2011 5:06am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics