Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - How do I operate on (default) property of Registry provider?

Reply
 
Old 04-10-2007   #1 (permalink)
Roman Kuzmin


 
 

How do I operate on (default) property of Registry provider?

1) Registry keys have so called default properties (with no name?). How do I
operate on them? For example how do I remove them?

Let's

0> Get-ItemProperty aa
....
p1 :
(default) :

(i.e. we have 2 properties including (default))

I tried:

0> Remove-ItemProperty aa '(default)'
… Property (default) does not exist at path HKEY_CURRENT_USER\a1\aa.

0> Remove-ItemProperty aa ''
… Cannot bind argument to parameter 'Name' because it is an empty string.

But Set-ItemProperty works with '(default)':

0> Set-ItemProperty aa '(default)' $null
0> Set-ItemProperty aa '(default)' 123
0> Set-ItemProperty aa '(default)' ''


2) Then, more fun: if I add a value with name '(default)' manually using
Regedit then I can't get properties at all:

0> Get-ItemProperty aa
… The member "(default)" is already present.

Is it a bug or what?

--
Thanks,
Roman

My System SpecsSystem Spec
Old 04-10-2007   #2 (permalink)
Roman Kuzmin


 
 

Re: How do I operate on (default) property of Registry provider?

Perhaps, to avoid misunderstanding, I have to add that new keys have no such
(default) properties. Moreover, I can remove them manually by Regedit. But I
cannot remove them by PowerShell (or don't know how). And the same problems
are with copying them and etc.

--
Thanks,
Roman



My System SpecsSystem Spec
Old 04-10-2007   #3 (permalink)
June Blender (MSFT)


 
 

RE: How do I operate on (default) property of Registry provider?

Definitely looks like a bug. Please file it on http://connect.microsoft.com/.

Sorry for the inconvenience and thanks for letting us know.

--
June Blender [MSFT]
Windows PowerShell Documentation
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.



"Roman Kuzmin" wrote:

> 1) Registry keys have so called default properties (with no name?). How do I
> operate on them? For example how do I remove them?
>
> Let's
>
> 0> Get-ItemProperty aa
> ...
> p1 :
> (default) :
>
> (i.e. we have 2 properties including (default))
>
> I tried:
>
> 0> Remove-ItemProperty aa '(default)'
> … Property (default) does not exist at path HKEY_CURRENT_USER\a1\aa.
>
> 0> Remove-ItemProperty aa ''
> … Cannot bind argument to parameter 'Name' because it is an empty string.
>
> But Set-ItemProperty works with '(default)':
>
> 0> Set-ItemProperty aa '(default)' $null
> 0> Set-ItemProperty aa '(default)' 123
> 0> Set-ItemProperty aa '(default)' ''
>
>
> 2) Then, more fun: if I add a value with name '(default)' manually using
> Regedit then I can't get properties at all:
>
> 0> Get-ItemProperty aa
> … The member "(default)" is already present.
>
> Is it a bug or what?
>
> --
> Thanks,
> Roman

My System SpecsSystem Spec
Old 04-10-2007   #4 (permalink)
Roman Kuzmin


 
 

Re: How do I operate on (default) property of Registry provider?

"June Blender (MSFT)" <juneb@remove_this_part_microsoft.com> wrote in
message news:77D088A4-E772-432F-8784-D8B6D93C133B@microsoft.com...
> Definitely looks like a bug. Please file it on
> http://connect.microsoft.com/.


Done,
https://connect.microsoft.com/feedba...0076&SiteID=99

--
Thanks,
Roman Kuzmin


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Registry Keys for Controlling Provider Security PowerShell
Get-ChildItem doesn't work properly on Registry Provider PowerShell
CTP3 Registry provider: incorrect location info for keys with '/' PowerShell
Can't select Yahoo mail as default provider Vista mail


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46