How to export registry settings safely under Windows 7?
-
Hi, I need to export some Registry Keys in HKCU in my application, so I simply make a call to regedit and user commandlineparameters /s /e to export these keys to a file. This used to work fine, but under Windows 7, everytime I call regedit I get an annoying message from UAC asking the user to allow this (in my eyes really uncritical) action. Do you have any suggestion how I can easily export a whole registry key to a reg-file, without getting a UAC warning?
-
Hi, I need to export some Registry Keys in HKCU in my application, so I simply make a call to regedit and user commandlineparameters /s /e to export these keys to a file. This used to work fine, but under Windows 7, everytime I call regedit I get an annoying message from UAC asking the user to allow this (in my eyes really uncritical) action. Do you have any suggestion how I can easily export a whole registry key to a reg-file, without getting a UAC warning?
You need to elevated privileges to run <code>regedit.exe</code>. So you either select allow from the UAC prompt or run <code>regedit.exe</code> from an elevated process. For example, if you run <code>cmd.exe</code> in elevated mode and then run <code>regedit.exe</code> from this command prompt you will not be asked whether to allow or deny.
«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
Hi, I need to export some Registry Keys in HKCU in my application, so I simply make a call to regedit and user commandlineparameters /s /e to export these keys to a file. This used to work fine, but under Windows 7, everytime I call regedit I get an annoying message from UAC asking the user to allow this (in my eyes really uncritical) action. Do you have any suggestion how I can easily export a whole registry key to a reg-file, without getting a UAC warning?
Will
RegSaveKeyEx()
work for you?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius