General discussion


Error changing password in NT Server

By arthurtan123 ·
I have write a VBS to change user password in NT workstation. User name was import from text file.It was run fine in NT worstation .When I run it on NT server there was a error Nx80005000. Would appreciate someone can help . My vbs is as below :

Dim fsoIn
Dim inFile
Dim arrUserNames
Dim strUser
Dim objUser
Dim strComputer
Dim newPassword
Const ForReading = 1
Const inFilename = "user.txt"

newPassword = Inputbox ("enter new password")

strComputer = Inputbox (" enter Computer Name")

Set fsoIn = CreateObject("scripting.filesystemobject")

Set inFile = fsoIn.OpenTextFile(inFilename, ForReading, True)


while Not inFile.AtEndofStream

arrUserNames = Split(inFile.Readline, vbTab, -1, 1)

strUser = arrUserNames(0)

Set objUser = GetObject("WinNT://" & strComputer & "/" & strUser)

objUser.SetPassword newPassword

objUser.Put "PasswordExpired", CLng(1)



wscript.echo ("Changing of Password Completed.")



This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by shawn In reply to Error changing password ...

Are you sure you have the Windows Script Host installed on the server? On workstations, this is usually installed with Internet Explorer.

To download and install the Windows Script Host, use the following URL (remove any spaces):

Hope this helps.

Collapse -

by arthurtan123 In reply to

thanks for your help . IT work after I upgraded the explorer from ver5.5 to ver 6 with sp1.

Collapse -

by p.j.hutchison In reply to Error changing password ...

Check which version of WSH you have installed by typing CSCRIPT ? on the command line. You need at least version 5.6 (comes with IE 5.5).

Collapse -

by arthurtan123 In reply to Error changing password ...

This question was closed by the author

Related Discussions

Related Forums