error message

Discussion in 'Windows Server' started by boba, May 19, 2008.

  1. boba

    boba Guest

    When users logon to the machine get error message: invalid root in registry
    key "HKLM\SOFTWARE\Microsoft\Ole\EnableDCOM" code 80070005 source
    wshshell.regwrite. How do I fix this error. My logon script shows the
    following

    Set WSHShell = WScript.CreateObject("WScript.Shell")
    'To Enable Remote DCOM in the computer
    WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Ole\EnableDCOM","Y","REG_SZ"
    'To Set Authentication Level to Connect
    WshShell.RegWrite
    "HKLM\SOFTWARE\Microsoft\Ole\LegacyAuthenticationLevel",2,"REG_DWORD"
    'To Set Impersonation level to Impersonate
    WshShell.RegWrite
    "HKLM\SOFTWARE\Microsoft\Ole\LegacyImpersonationLevel",3,"REG_DWORD"
    boba, May 19, 2008
    #1
    1. Advertising

  2. boba wrote:

    > When users logon to the machine get error message: invalid root in
    > registry
    > key "HKLM\SOFTWARE\Microsoft\Ole\EnableDCOM" code 80070005 source
    > wshshell.regwrite. How do I fix this error. My logon script shows the
    > following
    >
    > Set WSHShell = WScript.CreateObject("WScript.Shell")
    > 'To Enable Remote DCOM in the computer
    > WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Ole\EnableDCOM","Y","REG_SZ"
    > 'To Set Authentication Level to Connect
    > WshShell.RegWrite
    > "HKLM\SOFTWARE\Microsoft\Ole\LegacyAuthenticationLevel",2,"REG_DWORD"
    > 'To Set Impersonation level to Impersonate
    > WshShell.RegWrite
    > "HKLM\SOFTWARE\Microsoft\Ole\LegacyImpersonationLevel",3,"REG_DWORD"


    Users normally do not have permission to write to HKLM. On Vista clients
    even administrators ordinarily cannot write to HKLM in a logon script.

    A Startup script is a better option, as it runs with System privileges on
    the local computer (although this might not work on Vista clients).

    --
    Richard Mueller
    MVP Directory Services
    Hilltop Lab - http://www.rlmueller.net
    --
    Richard Mueller [MVP], May 19, 2008
    #2
    1. Advertising

  3. boba

    boba Guest

    This logon script is on Domain Controller under Default Domain Policy under
    User Configuration -> Script. Because of this script the users are getting
    this error message.

    "boba" wrote:

    > When users logon to the machine get error message: invalid root in registry
    > key "HKLM\SOFTWARE\Microsoft\Ole\EnableDCOM" code 80070005 source
    > wshshell.regwrite. How do I fix this error. My logon script shows the
    > following
    >
    > Set WSHShell = WScript.CreateObject("WScript.Shell")
    > 'To Enable Remote DCOM in the computer
    > WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Ole\EnableDCOM","Y","REG_SZ"
    > 'To Set Authentication Level to Connect
    > WshShell.RegWrite
    > "HKLM\SOFTWARE\Microsoft\Ole\LegacyAuthenticationLevel",2,"REG_DWORD"
    > 'To Set Impersonation level to Impersonate
    > WshShell.RegWrite
    > "HKLM\SOFTWARE\Microsoft\Ole\LegacyImpersonationLevel",3,"REG_DWORD"
    >
    >
    >
    boba, May 19, 2008
    #3
  4. boba

    boba Guest

    I forgot to mention, it has code: 80070005 after the error message. Does it
    mean I need to run updates on the server and that will fix the error? Last
    time I see the updates run on one DC was March 2007 with Service pack 1 and
    on the other DC with service pack 2 updates were run on May 2007.

    "boba" wrote:

    > When users logon to the machine get error message: invalid root in registry
    > key "HKLM\SOFTWARE\Microsoft\Ole\EnableDCOM" code 80070005 source
    > wshshell.regwrite. How do I fix this error. My logon script shows the
    > following
    >
    > Set WSHShell = WScript.CreateObject("WScript.Shell")
    > 'To Enable Remote DCOM in the computer
    > WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Ole\EnableDCOM","Y","REG_SZ"
    > 'To Set Authentication Level to Connect
    > WshShell.RegWrite
    > "HKLM\SOFTWARE\Microsoft\Ole\LegacyAuthenticationLevel",2,"REG_DWORD"
    > 'To Set Impersonation level to Impersonate
    > WshShell.RegWrite
    > "HKLM\SOFTWARE\Microsoft\Ole\LegacyImpersonationLevel",3,"REG_DWORD"
    >
    >
    >
    boba, May 19, 2008
    #4
  5. That explains the error. Logon scripts run with the credentials of the user
    and users generally do not have permission to write to HKLM. They should not
    have this privilege, as then they can be tricked to run code that messes up
    the registry.

    You probably can make these changes using a Startup script. In a Group
    Policy navigate to "Computer Configuration", "Windows Settings", "Scripts".
    A startup script runs before there is any user. It has System privileges on
    the local computer so it can write to HKLM.

    --
    Richard Mueller
    MVP Directory Services
    Hilltop Lab - http://www.rlmueller.net
    --

    "boba" <> wrote in message
    news:D...
    > This logon script is on Domain Controller under Default Domain Policy
    > under
    > User Configuration -> Script. Because of this script the users are getting
    > this error message.
    >
    > "boba" wrote:
    >
    >> When users logon to the machine get error message: invalid root in
    >> registry
    >> key "HKLM\SOFTWARE\Microsoft\Ole\EnableDCOM" code 80070005 source
    >> wshshell.regwrite. How do I fix this error. My logon script shows the
    >> following
    >>
    >> Set WSHShell = WScript.CreateObject("WScript.Shell")
    >> 'To Enable Remote DCOM in the computer
    >> WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Ole\EnableDCOM","Y","REG_SZ"
    >> 'To Set Authentication Level to Connect
    >> WshShell.RegWrite
    >> "HKLM\SOFTWARE\Microsoft\Ole\LegacyAuthenticationLevel",2,"REG_DWORD"
    >> 'To Set Impersonation level to Impersonate
    >> WshShell.RegWrite
    >> "HKLM\SOFTWARE\Microsoft\Ole\LegacyImpersonationLevel",3,"REG_DWORD"
    >>
    >>
    >>
    Richard Mueller [MVP], May 19, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Norm

    Error Message When Sending Message In Windows Mail

    Norm, Mar 22, 2006, in forum: Windows Vista General Discussion
    Replies:
    4
    Views:
    684
  2. Flowerman

    message not sent - error message

    Flowerman, Jul 16, 2007, in forum: Windows Vista Mail
    Replies:
    20
    Views:
    370
    Gary VanderMolen
    Oct 2, 2009
  3. DP4Jesus7
    Replies:
    8
    Views:
    796
    Guest
    Apr 9, 2008
  4. Balou33
    Replies:
    0
    Views:
    228
    Balou33
    Jul 15, 2004
  5. Adrian
    Replies:
    0
    Views:
    299
    Adrian
    Aug 22, 2008
Loading...

Share This Page