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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validate Password

Status
Not open for further replies.

TSSTechie

Technical User
May 21, 2003
353
0
0
GB
Howdy folks,

Wonder if someone might be able to help me finish a little vbscript i've written.

I basically ask the user for their Windows password and write this into the registry to create an autologon entry (to install a few things unattended and reboot a couple of times in between). This works fine until they enter an incorrect password, then they hit problems. I've added a second prompt so they enter the password twice and it compares them however, this still leaves room for error (ie. Caps Lock or, moreso in the case of laptops, Num Lock) so the password is entered wrongly both times.

What I really want to do is check the password they entered against the Windows one. I'm fairly certain this can't be done directly but would it be possible to try to apply the password in some way, test whether the attempt was successful and act accordingly ?

Thanks in advance for any help you can give

TSSTechie

[lightsaber] May The Force Be With You [trooper] [yoda]
 
I suppose you could try mappign a connection to a shared drive while specifying the given ID and password and capture if there is an error and if so reprompt for the password.



I hope you find this post helpful.

Regards,

Mark
 
i would go for a default user account for this sort of thing.
i.e. have a domain account with a known password which has restricted access to the software pool where the source files you want to execute are located.
then, when the user is logged on, (b4 you want to start your installation routine) the first script whcih is run adds the domain insallation account to the local admin group and sets an autologon with this user account which has a known, static password. you can then autologon to your hearts content and then set the defaultuser back to the original user (which you logged somewhere)

at least way you wont have the whole security implications of a prompt for someones passed word?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top