Link to home
Start Free TrialLog in
Avatar of Brew_City
Brew_CityFlag for United States of America

asked on

Registry Key Will not Merge

I need to add the registry key shown below to peoples computers.  I have it called in a batch file we run at logon.  That all works fine, the issue I'm having is it will not set the value of the key I'm creating.  Shown below I'm creating 2 keys, which both work fine and then I'm setting a default value for the command key.  This doesn't work, but if I change the value below to be just a # or word it will set fine.  I've tried running the .reg file locally on the computer and it doesn't set the value either.  Anyone have any ideas?

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Milw_Hlth_Directories_Builder]
@="Milw Hlth Directories Builder"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Milw_Hlth_Directories_Builder\command]
@="R:\\BatchFiles\DirectoryBuilder.bat \"%1\""


Avatar of Don
Don
Flag of United States of America image

Have you tried setting the appropriate values you need and then exporting this .Reg to then be used for import?
Avatar of Brew_City

ASKER

Yes that is when I decided to post it on here, because the issue wasn't making any sense to me.  I manually created the reg keys, assigned the appropriate value and then verified it was working.  I exported that key and it was identical to the .reg I've been trying to use, but it wouldn't work on another XP machine either and I know they are all at the same patch level and running the same image.
Are you looking to have a DWORD  value of Command ="R:\\BatchFiles\DirectoryBuilder.bat \"%1\" ?
SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try the .reg file below.

Also note that it would be better to run this as a startup script under the group policy node Computer Configuration\Windows Settings\Scripts\Startup.  Logon scripts run under the user's credentials and ordinary users probably don't have permissions to modify that registry key.  Startup scripts run under the local SYSTEM account and thus have administrator rights.


Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Milw_Hlth_Directories_Builder]
@="Milw Hlth Directories Builder"
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Milw_Hlth_Directories_Builder\command]
@="R:\\\\BatchFiles\\\\DirectoryBuilder.bat \"%1\""

Open in new window

Sorry,meant to say REG_SZ
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Shift-3
That seemed to work great, whats the story with \\\\?  This used to work with only \\ either way its working again so thanks alot for the help

dstewartjr
Yes I needed it to be a REG_SZ value
looks like Shift-3 got it for you
 
and hey, howdy neighbor(live in the Brew City as well)
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That's what I wrote.
Yeah so many responses came in at once I didn't see yours until after I had tested his and he had responded a few times already.  I still gave you points for having a correct answer.
Thx