regedit.exe fails to merge .reg files during user logon
Hi there,In our environment a lot of user settings are applied based on group memberships, location, department, etc. These settings are applied via .reg files using regedit along the lines of "c:\windows\regedit.exe /s "path to the .reg file".This works very well on XP but fails completely on Windows 7. We have a log file of all logon actions, and this records all of the correct calls to regedit.exe. However, none of the information is actually merged at all.If, as the user, after logon, I then manually run the exact same commands from a command prompt, then the information is successfully merged.Does anyone know why this is? Does W7 have some sort of security setting that prevents regedit from merging during logon?Thanks,Rob
October 8th, 2009 4:48am

Hi,Is there any way, using Task Scheduler, that you can get the process to run after all other initial processes have finished?Sorry for the vague question it's not may area of expertise :pJeffIf anyone is helpful, please click the 'Vote as helpful' icon. If anyone has answered, please click 'Suggest as answer' at the bottom of the post involved :) Thanks
Free Windows Admin Tool Kit Click here and download it now
October 8th, 2009 5:05am

Hi Jeff, yep, I am thinking of doing this but there are few extra problem that will cause, too, like settings not being applied before users start things off. I think it will work, though, so I'm going to throw a test together but it would still be nice to find out why it doesn't work :-)Thanks, Rob
October 8th, 2009 6:12am

ok, it's weird but I think I worked it out. Windows 7 won't merge a .reg file with regedit, reg or regedt32 at logon if the .reg file is on the network during logon. It works ok after logon, though.So, I changed our logon script to copy such files to %TEMP% and apply from there and now it works ok.I do often wonder why Microsoft do such things...
Free Windows Admin Tool Kit Click here and download it now
October 8th, 2009 7:59am

Nice find, glad it's sorted.If anyone is helpful, please click the 'Vote as helpful' icon. If anyone has answered, please click 'Suggest as answer' at the bottom of the post involved :) Thanks
October 8th, 2009 11:35am

I am not sure that your work around is a true solution (at least in my case). I had to do the same thing as you and ran into the similar problems. I tried your work around and it still gave me a prompt to write to hkcu... (the prompt was only for people on windows 7 and windows vista that have local admin permission, but I'd like it to be silent for them too). I got it to work by passing the "reg import" command rather than the "regedit /s" command. Regedit utility requires elevated permission, so by using another import command, no elevation. This is the command:reg import [path to reg file]It is also backwards compatable with xp...fyiThanks-Mike
Free Windows Admin Tool Kit Click here and download it now
December 24th, 2009 11:14pm

This is undoubtedly a little late for you, but hopefully will help some other people. I was having a frustrating time yesterday trying to get REGEDIT /S working in a logon script when the .reg file itself worked perfectly. Turns out that it was the /S that caused it to fail completely without any error. Try using -S instead!
April 19th, 2011 7:53pm

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

Other recent topics Other recent topics