Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to disable the administrator on local system

Status
Not open for further replies.

hartlen

IS-IT--Management
Aug 31, 2004
24
CN
when i want to disable the administrator on local system ,how can i do

Dim sComputer, sUser, oUser, sDSPath
Dim sNewPass
sUser = "Administrator"
sNewPass = "521013"
sComputer = "."

sDSPath = "WinNT://" & sComputer & "/" & sUser & ",user"

Set oUser = GetObject(sDSPath)
oUser.AccountDisabled=false
oUser.SetPassword sNewPass

no error but not work


 
Hello hartlen,

You need setinfo to commit.
[tt]
oUser.setinfo
[/tt]
regards - tsuji
 
You cannot disable any of the builtin accounts, I'm afraid. You can, however, rename them
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top