Batch File Help

Need help with this fake virus cleaner.

Page 1 of 1

2 Replies - 827 Views - Last Post: 28 August 2009 - 08:15 PM Rate Topic: -----

#1 C++ Programmer  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 20
  • View blog
  • Posts: 548
  • Joined: 12-June 08

Batch File Help

Post icon  Posted 01 January 2009 - 08:09 AM

Ok, so i am trying to make a fake virus cleaner, just to play a joke on my friend. Here is the code, please tell me what is wrong, it just doesnt work. :(

@echo off
:runprogram
cls
title Virus Clean
echo Would you like to hardrive and CPU from all viruses?
set /p input=
set input=
if %input% == dfghfdg goto invalid
if %input% == yes goto virusdel
if %input% == Yes goto virusdel
if %input% == YES goto virusdel
if %input% == No goto virusdel
if %input% == no goto virusdel
if %input% == NO goto virusdel

:invalid
cls
title Invalid Operation
echo sorry, that is an invalid operation.
pause
goto runprogram

:virusdel
cls
title Virus Cleaner (Running)
echo PlEASE DO NOT CLOSE THIS WINDOW,
echo DOING SO WILL COMPLETLY DELETE YOUR HARDRIVE.
pause
cls
dir/s
dir/s
dir/s
dir/s
pause
goto programcomplete

:programcomplete
cls
title Virus Cleaner (Complete)
echo Grats, you have completly deleted every virus on your hardrive.
echo Would you like to run the program again, just to make sure?
set /p input=
set input=
if %input% == sfdgh goto invalid2
if %input% == Yes goto virusdel
if %input% == yes goto virusdel
if %input% == YES goto virusdel
if %input% == no goto exitsuccess
if %input% == No goto exitsuccess
if %input% == NO goto exitsuccess

:invalid2
cls
title Invalid Operation
echo Sorry, that is an invalid operation.
pause
goto programcomplete

:exitsuccess
cls
title Exit 
echo Remeber to register on my site haxifix.darkbb.com
pause
exit


Thank you in advance
- C++ Programmer

Is This A Good Question/Topic? 0
  • +

Replies To: Batch File Help

#2 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5355
  • View blog
  • Posts: 27,314
  • Joined: 10-May 07

Re: Batch File Help

Posted 03 January 2009 - 09:57 PM

View PostC++ Programmer, on 1 Jan, 2009 - 09:09 AM, said:

Here is the code, please tell me what is wrong, it just doesnt work. :(


To be more exact, what doesn't work & how should it be working?
Was This Post Helpful? 0
  • +
  • -

#3 Yaroslav94  Icon User is offline

  • D.I.C Regular

Reputation: 5
  • View blog
  • Posts: 294
  • Joined: 15-July 09

Re: Batch File Help

Posted 28 August 2009 - 08:15 PM

Thank ME if I helped!!!

I think you have an EXTRA set input at the top ;)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1