I know I've asked this question before, but does anyone have a .bat or
.vbs script that can show me how to reset the administrator password of
a client machine, as Logon runs? The end-user account will have admin
rights locally, so should be able to do it, but I just don't know of the
command to do it.

A.

RE: ADmin reset by ChadManzer

ChadManzer
Wed Aug 18 13:13:03 CDT 2004

you can do nice and quick by:

strComputer = "MyComputer"
Set objUser = GetObject("WinNT://" & strComputer & "/Administrator, user")
objUser.SetPassword "testpassword"
objUser.SetInfo


"Adrian Marsh" wrote:

> I know I've asked this question before, but does anyone have a .bat or
> ..vbs script that can show me how to reset the administrator password of
> a client machine, as Logon runs? The end-user account will have admin
> rights locally, so should be able to do it, but I just don't know of the
> command to do it.
>
> A.
>

Re: ADmin reset by Adrian

Adrian
Mon Aug 23 06:22:37 CDT 2004

Chad,

I did find this reference in Microsofts script center, I've put the
following in my script:

strComputer = "."
Set objUser = GetObject("WinNT://" & strComputer & "/Administrator, user")
objUser.SetPassword "testpassword"
objUser.SetInfo

But it says theres an error 0x80005000 on line 2 char 1 (Set)
I've also tried putting the "." back to the local name of a test PC, but
get the same error.

Any idea?

Adrian

Chad Manzer wrote:
> you can do nice and quick by:
>
> strComputer = "MyComputer"
> Set objUser = GetObject("WinNT://" & strComputer & "/Administrator, user")
> objUser.SetPassword "testpassword"
> objUser.SetInfo
>
>
> "Adrian Marsh" wrote:
>
>
>>I know I've asked this question before, but does anyone have a .bat or
>>..vbs script that can show me how to reset the administrator password of
>>a client machine, as Logon runs? The end-user account will have admin
>>rights locally, so should be able to do it, but I just don't know of the
>>command to do it.
>>
>>A.
>>

Re: ADmin reset by Jason

Jason
Mon Aug 23 21:25:36 CDT 2004

Set WshNetwork = WScript.CreateObject("WScript.Network")
strComputer = WshNetwork.ComputerName

"Adrian Marsh (NNTP)" <me@nowhere.com> wrote in message
news:4129D37D.7050909@nowhere.com...
> Chad,
>
> I did find this reference in Microsofts script center, I've put the
> following in my script:
>
> strComputer = "."
> Set objUser = GetObject("WinNT://" & strComputer & "/Administrator, user")
> objUser.SetPassword "testpassword"
> objUser.SetInfo
>
> But it says theres an error 0x80005000 on line 2 char 1 (Set)
> I've also tried putting the "." back to the local name of a test PC, but
> get the same error.
>
> Any idea?
>
> Adrian
>
> Chad Manzer wrote:
>> you can do nice and quick by:
>>
>> strComputer = "MyComputer"
>> Set objUser = GetObject("WinNT://" & strComputer & "/Administrator,
>> user")
>> objUser.SetPassword "testpassword"
>> objUser.SetInfo
>>
>>
>> "Adrian Marsh" wrote:
>>
>>
>>>I know I've asked this question before, but does anyone have a .bat or
>>>..vbs script that can show me how to reset the administrator password of
>>>a client machine, as Logon runs? The end-user account will have admin
>>>rights locally, so should be able to do it, but I just don't know of the
>>>command to do it.
>>>
>>>A.
>>>