Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


mass change local admin pw

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> Post a VBScript >> mass change local admin pw
  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 >>
 mass change local admin pw - 10/13/2005 8:28:03 AM   
  kirrilian


Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline

      

_____________________________

Have you searched here ?
VBScript Fundamentals
My Site
 
 
Post #: 1
 
 RE: mass change local admin pw - 10/13/2005 11:39:11 PM   
  mbouchard


Posts: 1854
Score: 14
Joined: 5/15/2003
From: USA
Status: online
Nice, if you don't mind, I have a couple suggestions and a comment.

First the comment, please comment your code(no pun intended), while some have not problem following what is going on some do and comments might help prevent questions.

Now to the suggestions:
- You have a the echo if the password has special characters, enclose it in quotes.  Why not just enclose it yourself, this way you won't have to depend on the user doing it.
- It seems that both your elses for If Not objArgs.count = 0 and If ObjArgs.Count = 2 do the same thing, why not do away with one IF.  Something like

If Not objArgs.Count = 2 then
  Usage
Else
    Do what you need here.
End If

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to kirrilian)
 
 
Post #: 2
 
 RE: mass change local admin pw - 10/14/2005 8:31:05 AM   
  kirrilian


Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
I couldnt find a way to edit my original post so ill have to repost it with fixes

quote:


- You have a the echo if the password has special characters, enclose it in quotes.  Why not just enclose it yourself, this way you won't have to depend on the user doing it.

that is if they have shell interpeted special characters in their password like <>& and others.
quote:


- It seems that both your elses for If Not objArgs.count = 0 and If ObjArgs.Count = 2 do the same thing, why not do away with one IF.  Something like

fixed

as far as the comments go, i do comment my code but only when im doing something out of the ordinary with it, it creates more time on my already stretched schedule to comment code that is fairly generic.


      

_____________________________

Have you searched here ?
VBScript Fundamentals
My Site

(in reply to mbouchard)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> mass change local admin pw 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