Windows Vista Forums

How to 'set-location' to a registry key called "."
  1. #1


    Uncle Rico Guest

    How to 'set-location' to a registry key called "."

    This does not work because "*" is a wildcard...
    set-location hklm:\software\classes\*

    ....but this does...
    set-location -LiteralPath hklm:\software\classes\*

    This does not work because "." means current location...
    set-location hklm:\software\classes\.

    ....and *this* does not either...
    set-location -LiteralPath hklm:\software\classes\.



    How do I set-location to a registry key called "."?


      My System SpecsSystem Spec

  2. #2


    Mike Pfeiffer Guest

    RE: How to 'set-location' to a registry key called "."

    Set-Location 'HKLM:\SOFTWARE\Classes\`*'

    "Uncle Rico" wrote:

    > This does not work because "*" is a wildcard...
    > set-location hklm:\software\classes\*
    >
    > ...but this does...
    > set-location -LiteralPath hklm:\software\classes\*
    >
    > This does not work because "." means current location...
    > set-location hklm:\software\classes\.
    >
    > ...and *this* does not either...
    > set-location -LiteralPath hklm:\software\classes\.
    >
    > How do I set-location to a registry key called "."?
    >

      My System SpecsSystem Spec

  3. #3


    Jon Guest

    Re: How to 'set-location' to a registry key called "."


    "Uncle Rico" <UncleRico@xxxxxx> wrote in message
    news:4511804B-CC56-4EF8-8BD4-8E3F272E2A86@xxxxxx

    > This does not work because "*" is a wildcard...
    > set-location hklm:\software\classes\*
    >
    > ...but this does...
    > set-location -LiteralPath hklm:\software\classes\*
    >
    > This does not work because "." means current location...
    > set-location hklm:\software\classes\.
    >
    > ...and *this* does not either...
    > set-location -LiteralPath hklm:\software\classes\.
    >
    > How do I set-location to a registry key called "."?
    >


    Powershell has issues with registry keys called '.', period (if you can
    excuse the pun).

    I've noticed it previously when using Get-ChildItem and -recurse.

    AFAIK, 'HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.' isn't a key that occurs by
    default in any Windows version, although keys called '.' can and do occur in
    other regions of the registry.

    So where possible, I'd simply avoid calling any keys '.'.

    --
    Jon


      My System SpecsSystem Spec

  4. #4


    Mike Pfeiffer Guest

    RE: How to 'set-location' to a registry key called "."

    Sorry Uncle Rico, looks like I misread your post last night. I tried
    everything I could think of but I don't think this is possible.

    "Mike Pfeiffer" wrote:

    > Set-Location 'HKLM:\SOFTWARE\Classes\`*'
    >
    > "Uncle Rico" wrote:
    >

    > > This does not work because "*" is a wildcard...
    > > set-location hklm:\software\classes\*
    > >
    > > ...but this does...
    > > set-location -LiteralPath hklm:\software\classes\*
    > >
    > > This does not work because "." means current location...
    > > set-location hklm:\software\classes\.
    > >
    > > ...and *this* does not either...
    > > set-location -LiteralPath hklm:\software\classes\.
    > >
    > > How do I set-location to a registry key called "."?
    > >

      My System SpecsSystem Spec

  5. #5


    Joel Bennett Guest

    Re: How to 'set-location' to a registry key called "."

    PowerShell has major issues with paths containing [ or . or * anywhere,
    since they're legal names, but ALSO regular expressions. Obviously "."
    is especially problematic because it ALSO means something for folder paths!

    I'd file that as a bug, and lump it in with some of the other related
    bugs like the square braces in folder names. It's an anti-feature to
    support wildcards and patterns to the exclusion of matching actual file
    names.
    --
    Joel



    Uncle Rico wrote:

    > Windows uses the "." key for files without an extension (like "makefile").
    >
    > So I can't avoid the "." key.
    >
    > Powershell should have a way to deal with "." since it is a valid registry
    > key name.
    >
    > If it doesn't...then I consider that a powershell bug.
    >
    >
    > "Jon" wrote:
    >

    >> "Uncle Rico"<UncleRico@xxxxxx> wrote in message
    >> news:4511804B-CC56-4EF8-8BD4-8E3F272E2A86@xxxxxx

    >>> This does not work because "*" is a wildcard...
    >>> set-location hklm:\software\classes\*
    >>>
    >>> ...but this does...
    >>> set-location -LiteralPath hklm:\software\classes\*
    >>>
    >>> This does not work because "." means current location...
    >>> set-location hklm:\software\classes\.
    >>>
    >>> ...and *this* does not either...
    >>> set-location -LiteralPath hklm:\software\classes\.
    >>>
    >>> How do I set-location to a registry key called "."?
    >>>
    >>
    >>
    >> Powershell has issues with registry keys called '.', period (if you can
    >> excuse the pun).
    >>
    >> I've noticed it previously when using Get-ChildItem and -recurse.
    >>
    >> AFAIK, 'HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.' isn't a key that occurs by
    >> default in any Windows version, although keys called '.' can and do occur in
    >> other regions of the registry.
    >>
    >> So where possible, I'd simply avoid calling any keys '.'.
    >>
    >> --
    >> Jon
    >>
    >>

      My System SpecsSystem Spec

  6. #6


    Uncle Rico Guest

    Re: How to 'set-location' to a registry key called "."

    How do I file a bug report on powershell? I did a search and couldn't find
    anything.

    "Joel Bennett" wrote:

    > PowerShell has major issues with paths containing [ or . or * anywhere,
    > since they're legal names, but ALSO regular expressions. Obviously "."
    > is especially problematic because it ALSO means something for folder paths!
    >
    > I'd file that as a bug, and lump it in with some of the other related
    > bugs like the square braces in folder names. It's an anti-feature to
    > support wildcards and patterns to the exclusion of matching actual file
    > names.
    > --
    > Joel
    >
    >
    >
    > Uncle Rico wrote:

    > > Windows uses the "." key for files without an extension (like "makefile").
    > >
    > > So I can't avoid the "." key.
    > >
    > > Powershell should have a way to deal with "." since it is a valid registry
    > > key name.
    > >
    > > If it doesn't...then I consider that a powershell bug.
    > >
    > >
    > > "Jon" wrote:
    > >

    > >> "Uncle Rico"<UncleRico@xxxxxx> wrote in message
    > >> news:4511804B-CC56-4EF8-8BD4-8E3F272E2A86@xxxxxx
    > >>> This does not work because "*" is a wildcard...
    > >>> set-location hklm:\software\classes\*
    > >>>
    > >>> ...but this does...
    > >>> set-location -LiteralPath hklm:\software\classes\*
    > >>>
    > >>> This does not work because "." means current location...
    > >>> set-location hklm:\software\classes\.
    > >>>
    > >>> ...and *this* does not either...
    > >>> set-location -LiteralPath hklm:\software\classes\.
    > >>>
    > >>> How do I set-location to a registry key called "."?
    > >>>
    > >>
    > >>
    > >> Powershell has issues with registry keys called '.', period (if you can
    > >> excuse the pun).
    > >>
    > >> I've noticed it previously when using Get-ChildItem and -recurse.
    > >>
    > >> AFAIK, 'HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.' isn't a key that occurs by
    > >> default in any Windows version, although keys called '.' can and do occur in
    > >> other regions of the registry.
    > >>
    > >> So where possible, I'd simply avoid calling any keys '.'.
    > >>
    > >> --
    > >> Jon
    > >>
    > >>
    >

      My System SpecsSystem Spec

  7. #7


    tojo2000 Guest

    Re: How to 'set-location' to a registry key called "."

    On Jul 1, 11:43*pm, Uncle Rico <UncleR...@xxxxxx>
    wrote:

    > How do I file a bug report on powershell? I did a search and couldn't find
    > anything.
    >
    >
    >
    > "Joel Bennett" wrote:

    > > PowerShell has major issues with paths containing [ or . or * anywhere,
    > > since they're legal names, but ALSO regular expressions. Obviously "."
    > > is especially problematic because it ALSO means something for folder paths!
    >

    > > I'd file that as a bug, and lump it in with some of the other related
    > > bugs like the square braces in folder names. It's an anti-feature to
    > > support wildcards and patterns to the exclusion of matching actual file
    > > names.
    > > --
    > > Joel
    >

    > > Uncle Rico wrote:

    > > > Windows uses the "." key for files without an extension (like "makefile").
    >

    > > > So I can't avoid the "." key.
    >

    > > > Powershell should have a way to deal with "." since it is a valid registry
    > > > key name.
    >

    > > > If it doesn't...then I consider that a powershell bug.
    >

    > > > "Jon" wrote:
    >

    > > >> "Uncle Rico"<UncleR...@xxxxxx> *wrote in message
    > > >>news:4511804B-CC56-4EF8-8BD4-8E3F272E2A86@xxxxxx
    > > >>> This does not work because "*" is a wildcard...
    > > >>> * set-location hklm:\software\classes\*
    >

    > > >>> ...but this does...
    > > >>> * set-location -LiteralPath hklm:\software\classes\*
    >

    > > >>> This does not work because "." means current location...
    > > >>> * set-location hklm:\software\classes\.
    >

    > > >>> ...and *this* does not either...
    > > >>> * set-location -LiteralPath hklm:\software\classes\.
    >

    > > >>> How do I set-location to a registry key called "."?
    >

    > > >> Powershell has issues with registry keys called '.', period (if you can
    > > >> excuse the pun).
    >

    > > >> I've noticed it previously when using Get-ChildItem and -recurse.
    >

    > > >> AFAIK, 'HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.' isn't a key that occurs by
    > > >> default in any Windows version, although keys called '.' can and do occur in
    > > >> other regions of the registry.
    >

    > > >> So where possible, I'd simply avoid calling any keys '.'.
    >

    > > >> --
    > > >> Jon
    Google "microsoft connect powershell" and you should find a link to
    what you're looking for.

      My System SpecsSystem Spec

  8. #8


    Vadims Podans [MVP] Guest

    Re: How to 'set-location' to a registry key called "."

    https://connect.microsoft.com/PowerShell
    --
    WBR, Vadims Podans
    MVP: PowerShell
    PowerShell blog - www.sysadmins.lv

    "Uncle Rico" <UncleRico@xxxxxx> rakstīja ziņojumā
    "news:1B79B20E-92E4-49F8-B95E-DB020673B130@xxxxxx"...

    > How do I file a bug report on powershell? I did a search and couldn't find
    > anything.
    >
    > "Joel Bennett" wrote:
    >

    >> PowerShell has major issues with paths containing [ or . or * anywhere,
    >> since they're legal names, but ALSO regular expressions. Obviously "."
    >> is especially problematic because it ALSO means something for folder
    >> paths!
    >>
    >> I'd file that as a bug, and lump it in with some of the other related
    >> bugs like the square braces in folder names. It's an anti-feature to
    >> support wildcards and patterns to the exclusion of matching actual file
    >> names.
    >> --
    >> Joel
    >>
    >>
    >>
    >> Uncle Rico wrote:

    >> > Windows uses the "." key for files without an extension (like
    >> > "makefile").
    >> >
    >> > So I can't avoid the "." key.
    >> >
    >> > Powershell should have a way to deal with "." since it is a valid
    >> > registry
    >> > key name.
    >> >
    >> > If it doesn't...then I consider that a powershell bug.
    >> >
    >> >
    >> > "Jon" wrote:
    >> >
    >> >> "Uncle Rico"<UncleRico@xxxxxx> wrote in message
    >> >> news:4511804B-CC56-4EF8-8BD4-8E3F272E2A86@xxxxxx
    >> >>> This does not work because "*" is a wildcard...
    >> >>> set-location hklm:\software\classes\*
    >> >>>
    >> >>> ...but this does...
    >> >>> set-location -LiteralPath hklm:\software\classes\*
    >> >>>
    >> >>> This does not work because "." means current location...
    >> >>> set-location hklm:\software\classes\.
    >> >>>
    >> >>> ...and *this* does not either...
    >> >>> set-location -LiteralPath hklm:\software\classes\.
    >> >>>
    >> >>> How do I set-location to a registry key called "."?
    >> >>>
    >> >>
    >> >>
    >> >> Powershell has issues with registry keys called '.', period (if you
    >> >> can
    >> >> excuse the pun).
    >> >>
    >> >> I've noticed it previously when using Get-ChildItem and -recurse.
    >> >>
    >> >> AFAIK, 'HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.' isn't a key that occurs
    >> >> by
    >> >> default in any Windows version, although keys called '.' can and do
    >> >> occur in
    >> >> other regions of the registry.
    >> >>
    >> >> So where possible, I'd simply avoid calling any keys '.'.
    >> >>
    >> >> --
    >> >> Jon
    >> >>
    >> >>
    >>

      My System SpecsSystem Spec

  9. #9


    Bob Landau Guest

    Re: How to 'set-location' to a registry key called "."

    When you do file this bug report please reference this bug ID

    469661

    both of these are similar in that they use characters containing [, . , * .
    I suspect that they are related even though what I bugged is

    gci *

    not showing files in a folder that a name following this patter [folder]. In
    my case I could navigate to the folder just not see what was in it.

    "Uncle Rico" wrote:

    > How do I file a bug report on powershell? I did a search and couldn't find
    > anything.
    >
    > "Joel Bennett" wrote:
    >

    > > PowerShell has major issues with paths containing [ or . or * anywhere,
    > > since they're legal names, but ALSO regular expressions. Obviously "."
    > > is especially problematic because it ALSO means something for folder paths!
    > >
    > > I'd file that as a bug, and lump it in with some of the other related
    > > bugs like the square braces in folder names. It's an anti-feature to
    > > support wildcards and patterns to the exclusion of matching actual file
    > > names.
    > > --
    > > Joel
    > >
    > >
    > >
    > > Uncle Rico wrote:

    > > > Windows uses the "." key for files without an extension (like "makefile").
    > > >
    > > > So I can't avoid the "." key.
    > > >
    > > > Powershell should have a way to deal with "." since it is a valid registry
    > > > key name.
    > > >
    > > > If it doesn't...then I consider that a powershell bug.
    > > >
    > > >
    > > > "Jon" wrote:
    > > >
    > > >> "Uncle Rico"<UncleRico@xxxxxx> wrote in message
    > > >> news:4511804B-CC56-4EF8-8BD4-8E3F272E2A86@xxxxxx
    > > >>> This does not work because "*" is a wildcard...
    > > >>> set-location hklm:\software\classes\*
    > > >>>
    > > >>> ...but this does...
    > > >>> set-location -LiteralPath hklm:\software\classes\*
    > > >>>
    > > >>> This does not work because "." means current location...
    > > >>> set-location hklm:\software\classes\.
    > > >>>
    > > >>> ...and *this* does not either...
    > > >>> set-location -LiteralPath hklm:\software\classes\.
    > > >>>
    > > >>> How do I set-location to a registry key called "."?
    > > >>>
    > > >>
    > > >>
    > > >> Powershell has issues with registry keys called '.', period (if you can
    > > >> excuse the pun).
    > > >>
    > > >> I've noticed it previously when using Get-ChildItem and -recurse.
    > > >>
    > > >> AFAIK, 'HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.' isn't a key that occurs by
    > > >> default in any Windows version, although keys called '.' can and do occur in
    > > >> other regions of the registry.
    > > >>
    > > >> So where possible, I'd simply avoid calling any keys '.'.
    > > >>
    > > >> --
    > > >> Jon
    > > >>
    > > >>
    > >

      My System SpecsSystem Spec

  10. #10


    Uncle Rico Guest

    Re: How to 'set-location' to a registry key called "."

    I tried connect.microsoft.com/powershell before...
    The only option I have is "PowerShell Community Engagement Survey"...no bug
    report option.

    I checked other software on my dashboard has the bug report option...but not
    powershell.



    Is there another way people are reporting bugs?

    "Vadims Podans [MVP]" wrote:

    > https://connect.microsoft.com/PowerShell
    > --
    > WBR, Vadims Podans
    > MVP: PowerShell
    > PowerShell blog - www.sysadmins.lv
    >
    > "Uncle Rico" <UncleRico@xxxxxx> rakstīja ziņojumā
    > "news:1B79B20E-92E4-49F8-B95E-DB020673B130@xxxxxx"...

    > > How do I file a bug report on powershell? I did a search and couldn't find
    > > anything.
    > >
    > > "Joel Bennett" wrote:
    > >

    > >> PowerShell has major issues with paths containing [ or . or * anywhere,
    > >> since they're legal names, but ALSO regular expressions. Obviously "."
    > >> is especially problematic because it ALSO means something for folder
    > >> paths!
    > >>
    > >> I'd file that as a bug, and lump it in with some of the other related
    > >> bugs like the square braces in folder names. It's an anti-feature to
    > >> support wildcards and patterns to the exclusion of matching actual file
    > >> names.
    > >> --
    > >> Joel
    > >>
    > >>
    > >>
    > >> Uncle Rico wrote:
    > >> > Windows uses the "." key for files without an extension (like
    > >> > "makefile").
    > >> >
    > >> > So I can't avoid the "." key.
    > >> >
    > >> > Powershell should have a way to deal with "." since it is a valid
    > >> > registry
    > >> > key name.
    > >> >
    > >> > If it doesn't...then I consider that a powershell bug.
    > >> >
    > >> >
    > >> > "Jon" wrote:
    > >> >
    > >> >> "Uncle Rico"<UncleRico@xxxxxx> wrote in message
    > >> >> news:4511804B-CC56-4EF8-8BD4-8E3F272E2A86@xxxxxx
    > >> >>> This does not work because "*" is a wildcard...
    > >> >>> set-location hklm:\software\classes\*
    > >> >>>
    > >> >>> ...but this does...
    > >> >>> set-location -LiteralPath hklm:\software\classes\*
    > >> >>>
    > >> >>> This does not work because "." means current location...
    > >> >>> set-location hklm:\software\classes\.
    > >> >>>
    > >> >>> ...and *this* does not either...
    > >> >>> set-location -LiteralPath hklm:\software\classes\.
    > >> >>>
    > >> >>> How do I set-location to a registry key called "."?
    > >> >>>
    > >> >>
    > >> >>
    > >> >> Powershell has issues with registry keys called '.', period (if you
    > >> >> can
    > >> >> excuse the pun).
    > >> >>
    > >> >> I've noticed it previously when using Get-ChildItem and -recurse.
    > >> >>
    > >> >> AFAIK, 'HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.' isn't a key that occurs
    > >> >> by
    > >> >> default in any Windows version, although keys called '.' can and do
    > >> >> occur in
    > >> >> other regions of the registry.
    > >> >>
    > >> >> So where possible, I'd simply avoid calling any keys '.'.
    > >> >>
    > >> >> --
    > >> >> Jon
    > >> >>
    > >> >>
    > >>
    >

      My System SpecsSystem Spec

Page 1 of 2 12 LastLast
How to 'set-location' to a registry key called "." problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Folder called "Start Menu" appeared on my desktop Peter Lawton Vista General 1 09 Mar 2008
Downloaded files called "corrupt" won't run Ken Ottinger Vista General 2 19 Nov 2007
Changing "mailto" protocol via registry--no "clients" file under HKEY_USERS Cyn Vista mail 2 01 Mar 2007
Vista and it Myths and so called "Music files deletions" Ian Vista General 0 08 Feb 2007
EndInit() called twice for custom components??? + VS 2005 resources "None" bug cata Avalon 0 11 May 2006