Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

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

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 04-10-2007   #1 (permalink)
Roman Kuzmin
Guest


 

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
Guest


 

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)
Guest


 

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
Guest


 

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
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Use my custom TypeDescriptor to obtains default Value on property inXAML Property Editor of Visual Studio 2008 azerty Avalon 0 04-14-2008 06:14 AM
DVD Rom Will not operate on IDE GT1 Vista hardware & devices 7 02-01-2008 04:43 PM
question about: vista default user profile & registry\shell issues bwodie Vista installation & setup 2 11-11-2007 06:11 PM
Can't select Yahoo mail as default provider Sawsmith Vista mail 2 09-30-2007 11:47 PM
How to see and change the value of (Default) in a registry key John PowerShell 1 02-28-2007 02:18 PM


Vistax64.com 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 2005-2008

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 47 48 49 50 51