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

help with a vbscript password program

Status
Not open for further replies.

silentdeath

Programmer
Nov 14, 2010
1
US
I'm starting vb script and Ive been jotting down ideas, 1 that cought my eye was the idea of a little password program.

i was thinking of it being like

Code:
wscript.echo "enter your safelock password"
'(this is the part i couldnt quite get)
'it will prompt you for a password in a text box and if you get it right it will 'display
If orange
then
wscript.echo "Granted!"
else
'it will shut down with something like this
Set wshshell = wscript.CreateObject("WScript.Shell")
Wshshell.run "cmd"
wshshell.sendkeys "shutdown -s -t 5"
wscript.sleep 100
Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys"{ENTER}"

and i would put it in my start up folder

so...any help? (sorry if its crowded or the commands are wrong but im starting on vbscript)
 
Well, the answer to your question is the InputBox Function

But... I HOPE this is an exercise in learning some VBScript, and not actually an attempt at adding security to your system...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top