Welcome to our forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Forum Statistics

  • Forum Members:
  • Total Threads:
  • Total Posts: 2
There are 1 users currently browsing forums.
General Programming Here you can talk about scripting in other languages such as Perl, Delphi, Pascal and Python.

Reply
  #1  
Old 12-30-2008
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
  #2  
Old 01-02-2009
Child
 
Join Date: Nov 2008
Posts: 53
Rep Power: 2
Rtyler is on a distinguished road
Re: CMD script review

Tested the script, works well, dont see the need to ask the users name as it is not required.

nice job
Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: Create a simple login script using ASP.NET bfsog .Net Programming 0 09-24-2008 05:07 AM
New Version of HTB Monitoring Script Introduces System Tray Add-on hostthebest News and Discussion 0 06-03-2008 07:00 AM
PHP script using MySQL arcanistherogue PHP Scripting 10 06-23-2007 09:14 AM
PHP mail script eazman PHP Scripting 7 06-06-2005 01:53 PM
PHP News Script unclekyky PHP Articles 0 09-03-2004 08:07 PM