I have been cruising the forums and the internet. I cannot figure out how to write this value to the registry if I have the trademark symbol in the path.
reg add "HKCU\Software\TESTKEY\TESTKEY2®\Global" /v TESTVALUE /t REG_DWORD /d 0 /f
The output; as seen below shows that the trademark symbol is replaced with redirection symbols.
C:\Program Files (x86)\TEST>reg add "HKCU\Software\TESTKEY\TESTKEY2«\Global" /v TESTVALUE /t REG_DWORD /d 0 /f
The operation completed successfully.
Looking for some insight and help on this one. Thanks.
Reg add in batch not working w/ trademark symbol in path.
Moderator: DosItHelp
-
- Posts: 2
- Joined: 15 Jan 2014 16:23
Re: Reg add in batch not working w/ trademark symbol in path
What code page are you using?
Re: Reg add in batch not working w/ trademark symbol in path
Squashman wrote:What code page are you using?
I think I can answer that myself. You are probably using 1252.
Re: Reg add in batch not working w/ trademark symbol in path
hello, try use instead the trademark the ? symbol
-
- Posts: 2
- Joined: 15 Jan 2014 16:23
Re: Reg add in batch not working w/ trademark symbol in path
Thank you for the replies. I am doing some research into everything that was metioned.
I did not specify a codepage in in my batch file. Google says default Windows 7 x64 codepage is 850. I did try 65001 from a Google suggestion.
I did try to use the ? symbol, but the registry key and output in the command prompt came out as the same ? symbol.
I did not specify a codepage in in my batch file. Google says default Windows 7 x64 codepage is 850. I did try 65001 from a Google suggestion.
I did try to use the ? symbol, but the registry key and output in the command prompt came out as the same ? symbol.
-
- Posts: 233
- Joined: 21 Nov 2010 08:07
- Location: At My Computer
Re: Reg add in batch not working w/ trademark symbol in path
Instead of doing a reg add from commandline you could do a reg import to the temp first then import it over like so..
DP
DP
Code: Select all
@Echo Off
> "%Tmp%\~trademark.reg" Echo Windows Registry Editor Version 5.00
>> "%Tmp%\~trademark.reg" Echo.
>> "%Tmp%\~trademark.reg" Echo [HKEY_CURRENT_USER\Software\TESTKEY\TESTKEY2®]
>> "%Tmp%\~trademark.reg" Echo [HKEY_CURRENT_USER\Software\TESTKEY\TESTKEY2®\Global]
>> "%Tmp%\~trademark.reg" Echo "TESTVALUE"=dword:00000000
Start /Wait Regedit /s "%Tmp%\~trademark.reg"
Del "%Tmp%\~trademark.reg"
Re: Reg add in batch not working w/ trademark symbol in path
try this:
Code: Select all
chcp 1252
reg add "HKCU\Software\TESTKEY\TESTKEY2®\Global" /v TESTVALUE /t REG_DWORD /d 0 /f