icecom3 Posted April 28, 2012 Posted April 28, 2012 FYI, as of windows 7, trying to make a registry entry that is initiated by anything other than the user clicking on a .bat or .reg file is difficult. Example, make a bat that launches REGEDIT /S and it will work. Now compile that bat to an exe (but change nothing in the script) and notice it will not work. Even if you make the exe call another .bat file which then calls REGEDIT /S...it still does not work. Many people are having this problem, as it relates to the added security in windows 7. Try "reg import [path to reg file]" instead of REGEDIT /S If that don't work, try running the .reg file that is being launched from the %temp% directory. Both of these are permissions friendly.
DarkBoost Posted April 28, 2012 Author Posted April 28, 2012 icecom3 - thank you for posting. i have tried both and both have failed with the exact same issue... moving forward i am just going to execute it from a Batch file. Run("reg import c:file.reg") <= failed Run("reg import " & @TempDir & "file.reg") <= failed
ibroadbent Posted November 19, 2012 Posted November 19, 2012 I found that under Windows 7 64-bit:run("regedit.exe /s C:Reg.reg") statement failed, butrun("reg.exe IMPORT C:Reg.reg") worked OK, and the registry keys were imported successfully (the user had rights to these areas)When run manually from the command line, the first statement generates a User Account Control prompt, but the second one doesn't.
Moderators JLogan3o13 Posted November 19, 2012 Moderators Posted November 19, 2012 Do you have #RequireAdmin at the top of your script? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now