View Single Post
Old 09-04-2007   #4 (permalink)
Shay Levi


 
 

Re: BUG? Registry keys with / in names

Got back to regedit.exe and tried to replace "\" with "/"
I got the following error:

The registry editor cannot rename "NameWith/Slash". Specify a key name without
a backslash (\).

Shay
http://scriptolog.blogspot.com


Quote:

> Running REG.exe emmits the key
>
> PS HKCU:\> reg query hkcu
>
> ! REG.EXE VERSION 3.0
>
> HKEY_CURRENT_USER
>
> (...)
> HKEY_CURRENT_USER\NameWith/Slash
> (...)
> HKEY_CURRENT_USER\Network
> HKEY_CURRENT_USER\Printers
> HKEY_CURRENT_USER\Software
> (...)
> # query the key
> PS HKCU:\> reg query HKEY_CURRENT_USER\NameWith/Slash
> ! REG.EXE VERSION 3.0
>
> HKEY_CURRENT_USER\NameWith/Slash
> ValueWith/Slash REG_SZ 123
> Notice that the "\" sign became "/"?
>
> Shay
> http://scriptolog.blogspot.com
Quote:

>> I guess the "/" sign confuses the provider cause it's suppose to be a
>> hierarchy delimiter?
>>
>> Anyway, under HKCU I created a new key with the name "NameWith/Slash"
>> and inside of it I created a string value with the name
>> "ValueWith/Slash"
>>
>> Non shows when listing HKCU with PowerShell
>>
>> Shay
>> http://scriptolog.blogspot.com
Quote:

>>> It looks like Registry provider or Get-ChildItem (or both, or
>>> something else in the engine) has troubles with registry key names
>>> containing / in them (it is a valid symbol for registry names).
>>> Get-ChildItem does not return items with such names. Can anybody
>>> confirm this?
>>>

My System SpecsSystem Spec