View Single Post
  #1  
Old 12-30-2008
Route 0 Route 0 is offline
Toddler
 
Join Date: Dec 2008
Posts: 7
Rep Power: 0
Route 0 is on a distinguished road
CMD script review

I wrote this code a while back, and I was wondering if you guys would reveiw it. Basically, it lets a user change there password from a cmd window and not have to know the password to change it.

Code:
@echo off

set /p usr=What is your name?  
goto program1
:Program1
Echo Hello %usr%, Welcome to Lock-Out. What would you like to do today?
pause
Echo 1. Change Password
set /p comd=Please enter the number of the task you would like to preform:   
If %comd% equ 1 goto change
goto sorry

:Sorry
Echo Sorry, that doesn't appear to be a command.
goto Program1

:Change
net user
set /p name=What password would you like to change?
net user %name% *
pause
set /p 000=Change another (Y or N)?  
If 000 equ Y goto Change
If 000 equ y goto Change
If 000 equ N goto Program1
If 000 equ n goto Program1
Reply With Quote