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\""


Brew_CityAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DonNetwork AdministratorCommented:
Have you tried setting the appropriate values you need and then exporting this .Reg to then be used for import?
0
Brew_CityAuthor Commented:
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.
0
DonNetwork AdministratorCommented:
Are you looking to have a DWORD  value of Command ="R:\\BatchFiles\DirectoryBuilder.bat \"%1\" ?
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Only the command key value does not work?
Try it with

@="R:\\BatchFiles\\DirectoryBuilder.bat \"%1\""
0
Shift-3Commented:
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

0
DonNetwork AdministratorCommented:
Sorry,meant to say REG_SZ
0
DonNetwork AdministratorCommented:
If so try
 

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Milw_Hlth_Directories_Builder]
@="Milw Hlth Directories Builder"
"Command"="\"R:\\\\BatchFiles\\DirectoryBuilder.bat \\\"%1\\\""
0
Brew_CityAuthor Commented:
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
0
DonNetwork AdministratorCommented:
looks like Shift-3 got it for you
 
and hey, howdy neighbor(live in the Brew City as well)
0
Shift-3Commented:
Since backslash is the escape character, it's necessary to double them when importing from a .reg file.  

The below would work to set the path in the registry with single backslashes.


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

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
That's what I wrote.
0
Brew_CityAuthor Commented:
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.
0
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Thx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows XP

From novice to tech pro — start learning today.