Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Help With My Scripts

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,2016
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Help With My Scripts
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Help With My Scripts - 2/9/2005 5:11:03 AM   
  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.
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Help With My Scripts Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts