| |
dogboyaa
Posts: 26
Score: 0
Joined: 12/20/2004
From:
Status: offline
|
I was working on these scripts but I can't figure out how to make them accept input from the html document. Here is a example of a script that changes the password of all admin equivlent users including the Administrator account. You will have to rename to either .hta or html.... '-----------Begining of App-------- <HTML> <HEAD> <TITLE> "VBScript Demo"</TITLE> <SCRIPT LANGUAGE="VBScript"> Sub DestroyObjects() If IsObject(objAdminUser) Then Set objAdminUser = Nothing If IsObject(objAdminsGroup) Then Set objAdminsGroup = Nothing If IsObject(objWSHNetwork) Then Set objWSHNetwork = Nothing End Sub strNewPass = InputBox("Enter New Password", "SFASU - User Password Change Tool by Abdul") If strNewPass <> "" Then intCounter = 0 Set objWSHNetwork = CreateObject("WScript.Network") strComputerName = objWSHNetwork.ComputerName Set objAdminsGroup = GetObject("WinNT://" & strComputerName & "/Administrators") For Each objAdminUser In objAdminsGroup.Members intCounter = intCounter + 1 objAdminUser.SetPassword strNewPass objAdminUser.SetInfo Next DestroyObjects() MsgBox "Completed changing the password of " & intCounter & " administrative user(s) on " & strComputerName & ".", vbInformation, "Execution completed" Else MsgBox "A password was not specified. Blank Passwords Not Permited!", vbInformation, "Execution aborted" End If </SCRIPT> </HEAD> </BODY> </HTML> '------------------------End of App------------- What i will like to do is instead of having a pop up box that asks for the new password, I would like to html to do it. I figure it will be a text box or something... I have several other scripts that would have to be converted, but I figure if I saw this one done the rest will be easy. Thanks.
|
|