Admin password "HELP"

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
joakim
Posts: 24
Joined: 07 Mar 2012 12:08

Admin password "HELP"

#1 Post by joakim » 07 Mar 2012 12:32

Hi im new at this site and i need a little. Im working on a Admin password chanser.



@echo off
color a
title Admin acc
echo Do you want to start Hacking Admin acount? (yes or no)

set/p "cho=>"
if %cho%==no goto no
if %cho%==yes goto yes

:no

exit

:yes

net user


echo wright your Admins account name here and press enter,


set/p "cho=>"



echo %cho%

net user %echo%*



pause




this isnt working :roll:

Squashman
Expert
Posts: 4471
Joined: 23 Dec 2011 13:59

Re: Admin password "HELP"

#2 Post by Squashman » 07 Mar 2012 12:47

%echo% is not your variable. You are using %cho%

I wouldn't use the same variable name for both of your questions. If you just hit enter on the second question which asks for the user name the variable cho is still defined as yes.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Admin password "HELP"

#3 Post by foxidrive » 07 Mar 2012 23:08

Try this, and the variable cho is set to nul before each question, as Squashman points out.

Code: Select all

@echo off
color a
title Admin acc
echo.
:begin
set "cho="
set/p "cho=Do you want to start Hacking Admin acount? (yes or no) > "
if not defined cho goto :begin
if /i %cho%==no goto :no
if /i %cho%==yes goto :yes
goto :EOF
:no
exit
goto :EOF

:yes
net user
echo.
set "cho="
set /p "cho=Write your Admins account name here and press enter> "
if not defined cho goto :yes

echo %cho%
net user %cho%*
pause


joakim
Posts: 24
Joined: 07 Mar 2012 12:08

Re: Admin password "HELP"

#4 Post by joakim » 08 Mar 2012 12:02

Ty 4 your help i fixt it

@echo off
title made by LAMA_dISCO (C)
cls
color a

echo Do you want to chance the Administators password? (yes,no or menu)
set/p "cho=>"

if %cho%==no goto no

if %cho%==yes goto yes

if %cho%==menu goto menu

:menu

call hackmenu

pause
:no

exit

:yes
cls
net user

pause

echo Pleach wright your Adminstraitors account name here then press enter.
set/p "cho=>"

net user %cho% *

pause

Post Reply