Windows Vista Forums

Error message on new-item in HKLM:

  1. #1


    dreeschkind Guest

    Error message on new-item in HKLM:

    I got a quite meaningless error message just saying 'wrong parameter' when
    trying to create a subkey of HKLM. Creating the same subkey in HKLM:\software
    works.


    PoSh 71 [42/25] C:\>new-item -path "hklm:\" -name foo
    New-Item : Falscher Parameter.
    At line:1 char:9
    + new-item <<<< -path "hklm:\" -name foo






    PoSh 72 [42/25] C:\>new-item -path "hklm:\software" -name foo


    Hive: Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\software

    SKC VC Name Property
    --- -- ---- --------
    0 0 foo {}


    --
    greetings
    dreeschkind

      My System SpecsSystem Spec

  2. #2


    Wei Wu [MSFT] Guest

    Re: Error message on new-item in HKLM:

    If you try creating "foo" under HKLM in regedit, you will get a error
    message saying "Cannot create key: Error writing to the registry."
    I agree the error message from PowerShell could be better. Please bug this.
    Thanks.

    --
    Wei Wu [MSFT]
    Windows PowerShell Team
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "dreeschkind" <dreeschkind@discussions.microsoft.com> wrote in message
    news:A727F521-9D4F-4FAB-A825-BD9A61B90F04@microsoft.com...
    >I got a quite meaningless error message just saying 'wrong parameter' when
    > trying to create a subkey of HKLM. Creating the same subkey in
    > HKLM:\software
    > works.
    >
    >
    > PoSh 71 [42/25] C:\>new-item -path "hklm:\" -name foo
    > New-Item : Falscher Parameter.
    > At line:1 char:9
    > + new-item <<<< -path "hklm:\" -name foo
    >
    >
    >
    >
    > PoSh 72 [42/25] C:\>new-item -path "hklm:\software" -name foo
    >
    >
    > Hive: Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\software
    >
    > SKC VC Name Property
    > --- -- ---- --------
    > 0 0 foo {}
    >
    >
    > --
    > greetings
    > dreeschkind




      My System SpecsSystem Spec

  3. #3


    dreeschkind Guest

    Re: Error message on new-item in HKLM:

    Bug filed at:

    https://connect.microsoft.com/feedba...0233&SiteID=99

    --
    greetings
    dreeschkind

    "Wei Wu [MSFT]" wrote:

    > If you try creating "foo" under HKLM in regedit, you will get a error
    > message saying "Cannot create key: Error writing to the registry."
    > I agree the error message from PowerShell could be better. Please bug this.
    > Thanks.
    >
    > --
    > Wei Wu [MSFT]
    > Windows PowerShell Team
    > Microsoft Corporation
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    > "dreeschkind" <dreeschkind@discussions.microsoft.com> wrote in message
    > news:A727F521-9D4F-4FAB-A825-BD9A61B90F04@microsoft.com...
    > >I got a quite meaningless error message just saying 'wrong parameter' when
    > > trying to create a subkey of HKLM. Creating the same subkey in
    > > HKLM:\software
    > > works.
    > >
    > >
    > > PoSh 71 [42/25] C:\>new-item -path "hklm:\" -name foo
    > > New-Item : Falscher Parameter.
    > > At line:1 char:9
    > > + new-item <<<< -path "hklm:\" -name foo
    > >
    > >
    > >
    > >
    > > PoSh 72 [42/25] C:\>new-item -path "hklm:\software" -name foo
    > >
    > >
    > > Hive: Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\software
    > >
    > > SKC VC Name Property
    > > --- -- ---- --------
    > > 0 0 foo {}
    > >
    > >
    > > --
    > > greetings
    > > dreeschkind

    >
    >
    >


      My System SpecsSystem Spec

Error message on new-item in HKLM:

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Message: "Could not find this item" jarrodsizemore Vista file management 1 29 Apr 2008
Error Message -Item Not Found- nicjp Vista file management 10 23 Apr 2008
Get-Item error mario PowerShell 4 06 Feb 2008
Can't delete message in send item folder Johnnymast Vista mail 1 09 Nov 2007
Sent item message cannot be deleted Gary Vista mail 1 20 Jun 2007