Windows Installer on Windows 7 access the HKEY_LOCAL_MACHINE registry
I am using Windows Installer to modify the HKEY_LOCAL_MACHINE hive [specifically HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Run entry]. It works fine for Windows XP and below, but with Windows 7 it cannot write the registery value. I have temporarily changed HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER, but I would like to get it running properly. I had the same problem with the program that Windows Installer installs, until I modified the manifest file to give my program access to HKEY_LOCAL_MAHCINE on Windows 7. Now I need to give Windows Installer the same access to HKEY_LOCAL_MACHINE on Windows 7. I am using Visual Studio 2008.
July 2nd, 2010 5:48pm

Run the MSI file with admin rights. It only works under XP, because you have admin rights when you install the msi."A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2010 3:10am

Hi, Please make sure that you log in with administrator account, if you still can’t access this registry key, try taking ownership of it: 1) Click the "Start" button, type "regedit" (without quotation marks) in the "Search" bar, right click on the "regedit.exe" found in the list and then click "Run as administrator". 2) Navigate to the following key: 3) HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Run 4) Right click the HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Run entry on the left pane, choose "Export", select "Desktop" in the "Save in" box and type "backup" (without quotation marks) in "File Name". Click "Save". Please Note: The backup file is on the Desktop and named "backup.reg". We can simply restore the registry by double-clicking the "backup.reg" file. 5) Right click on the HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Run entry on the left pane and choose Permissions… 6) Please check if "Administrators" is listed in the "Group and User" name list. If not, please click the "Add" button and type "Administrators" in the open window and click "OK" to add this group. 7) Highlight "Administrators" and check on "Full Control" under "Accept". 8) Click the "Advanced" button and choose the "Owner" tab. 9) Highlight the current user account in the list and mark the check box before "Replace owner on subcontainers and objects". 10) Click OK to save changes and wait for Windows 7 to transfer the ownership of all the objects on the partition. Note: if there is the warning information "Error: The Registry Editor could not set security in the key currently selected, or some of its subkeys", it is normal. Please click "OK". 11) Click OK again to save the changes and exit the Properties window. As you are using Visual Studio 2008, you could post in Visual Studio forums for support as well. Best Regards Dale Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
July 5th, 2010 7:41am

Isn't there some method to include registry permissions entries when creating an installer package?
Free Windows Admin Tool Kit Click here and download it now
July 5th, 2010 10:10am

DEFCON 1 has the point. Windows installer is creating an install program (.msi run by Setup.exe). The procedure outlined by Dale Quo might be fine, but as a publisher of software I can't require the user to go through a complicated procedure to install. I need to be able to modify the installer executable so that the installer is able to modify HKEY_LOCAL_MACHINE by itself. I can do this with a VC++ VS 2008 program by modifying the manifest file, but how is it done for a .msi created by Windows Installer?
July 6th, 2010 10:04pm

Since you uses Visual Studio 2008 to modify the file, it is due to the development issue, please post in Visual Studio forums for support. Thanks for your understanding and cooperation. Best Regards DalePlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
July 7th, 2010 4:29am

Dale, Siddharth Chavan<abbr class="affil">MSFT</abbr><abbr class="affil">, Administrator told me to post here. see: http://social.msdn.microsoft.com/Forums/en-US/whatforum/thread/3adb4c35-acd6-4dad-a989-af034737cdcd</abbr>
July 7th, 2010 9:59pm

You didn't mention that you were using VC++ or VS to modify the file in above forum, if you mentioned it, I believe Siddharth Chavan will suggest you posting in Visual Studio forums as the question is relevant to developing issue. Best Regards DalePlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
July 8th, 2010 11:22am

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

Other recent topics Other recent topics