1
I am trying to export the registry key HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe
but am unable to do so, probably because of the percent signs.
I tried to escape the %-sign with a caret or another %-sign, but this didn't help me:
regedit /e c:\temp\cmd.reg "HKEY_CURRENT_USER\Console\%%SystemRoot%%_system32_cmd.exe"
and
regedit /e c:\temp\cmd.reg "HKEY_CURRENT_USER\Console\^%SystemRoot^%_system32_cmd.exe"
So, is there a way to do what I want.
Edit as per Ярослав Рахматуллин's comment: the key is the exact string, with the percent signs. So I don't want %SystemRoot%
expanded, but passed to regedit as is.
Do you want the variable to expand? As in do you want the key located at what would be the location in the tree if the proper value for the system root was inserted instead of variable? – Ярослав Рахматуллин – 2012-10-13T08:13:49.447
No, the variable should not be expanded. – René Nyffenegger – 2012-10-13T08:53:59.507