Re: Startup Script Problem

From: Glenn L (the.only(delete)_at_gmail)
Date: 01/18/05


Date: Mon, 17 Jan 2005 21:04:34 -0800

C:\Tools>err.exe 80005000
# for hex 0x80005000 / decimal -2147463168 :
  E_ADS_BAD_PATHNAME adserr.h
# An invalid directory pathname was passed
# 1 matches found for "80005000"

Here is what the return code means.
You might want to run a network trace at the authenticating DC when it works
and when it doesn't work.
I suspect the script may not even be putting anything on the wire when it
fails.

-- 
Glenn L
CCNA, MCSE 2000/2003 + Security
"Keith" <@.> wrote in message news:ed8cwUJ$EHA.208@TK2MSFTNGP12.phx.gbl...
>I am trying to execute a VBS script at startup but keep getting an error.
>
> The script is to add a network group to the local admin group of the 
> machine.
>
> Scrpt executes fine if run manually, so I know there is nothing wrong with 
> it, but fails if run as a GPO startup script.
>
> Error is: 0x80005000 on Line 11
>
> Any help please?
>
> '--------------------8<----------------------
>
> Set oWshNet = CreateObject("WScript.Network")
>
> sGroup = "Local Admins"
>
> sNetBIOSDomain = oWshNet.UserDomain
> sComputer = oWshNet.ComputerName
>
> Set oGroup = GetObject("WinNT://" & sComputer & "/Administrators,group")
> Set oUser = GetObject("WinNT://" & sNetBIOSDomain & "/" & sGroup & 
> ",group")
>
> ' suppress errors in case the user is already a member
> On Error Resume Next
> oGroup.Add(oUser.ADsPath)
> On Error Goto 0
> '--------------------8<----------------------
>
>
> 


Relevant Pages

  • Re: admin group in OU - help please
    ... Please do not send e-mail directly to this alias. ... > is not in a Local admin group the i get script error: ...
    (microsoft.public.win2000.security)
  • Re: Changing the local admin password base on the computers OU
    ... The intent is to put thsi script in a GPO that runs everytime the ... allowing us to cahnge local admin passwords pretty ... Your script appears to check for group membership. ... object and use the Parent method to retrieve the ADsPath of the parent ...
    (microsoft.public.scripting.vbscript)
  • Re: admin group in OU - help please
    ... is not in a Local admin group the i get script error: ... If i login with a user that has local admin rights then the script adds user ... > administrator on their machines and then set ...
    (microsoft.public.win2000.security)
  • RE: Changing local admin PW using vb logon script - can it be encrypted?
    ... > True enough, but to quote a tall, hairy dewd I've worked with ... > will only buy you 5 minutes while they search for the script ... I missed the tall hairy "dewd" reference, and I agree that security must ... local admin ought to have more protection than that. ...
    (Focus-Microsoft)
  • Re: On error resume next on encoded VB script
    ... I have a vb script that changes the local admin password of a ... My script tries to change ... since only one of the usernames will actually work. ... 'Change password for French local admin account ...
    (microsoft.public.vb.general.discussion)