Skip to content

Commit edae4ac

Browse files
committed
Update AutoRunWithCMD.cmd
This is the 2nd major release, cleans up the code, make typing in (most) choice things easier, and more things works.
1 parent dcabf3d commit edae4ac

File tree

1 file changed

+29
-24
lines changed

1 file changed

+29
-24
lines changed

AutoRunWithCMD.cmd

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,8 @@
22
@echo off
33
cls
44
color 0a
5+
cd %appdata%
56
:: Debug stuff, making a place for logs
6-
if exist "Debug" (
7-
cd "Debug".
8-
goto DebugExists
9-
echo This should never occurr, please contact the developer and give the error code "1"
10-
) else (
11-
mkdir "Debug".
12-
cd "Debug".
13-
goto DebugExists
14-
)
15-
16-
:DebugExists
177
if exist "Sanikdah Software" (
188
cd "Sanikdah Software".
199
goto SSFolderExists
@@ -34,12 +24,13 @@ if exist "Ease of Use Command Prompt Auto Run Script" (
3424
)
3525
:EoUCPARS-FolderExists
3626
echo.>Launched.txt
27+
goto :MainMenu
3728

3829
:: Launches if the previous code detects that this is your first time launching the program
3930
:FirstTimeUser
4031
title Do you want a tutorial?
4132
echo.Hey! You seem like you ran this program for the first time! Would you like a tutorial on how to navigate?
42-
set /p wantsTutorial= Do you want a tutorial?=
33+
set /p wantsTutorial=
4334
if not '%wantsTutorial%'=='' set choice=%wantsTutorial:~0,1%
4435
if '%wantsTutorial%'=='y' goto :wantsTutorial
4536
if '%wantsTutorial%'=='Y' goto :wantsTutorial
@@ -55,7 +46,8 @@ ECHO.
5546

5647
:wantsTutorial
5748
echo.Placeholder tutorial.
58-
set /p wantsTutorial= Do you want to see the tutorial again?
49+
echo.Do you want to see the tutorial again?
50+
set /p wantsTutorial=
5951
if not '%wantsTutorial%'=='' set choice=%wantsTutorial:~0,1%
6052
if '%wantsTutorial%'=='y' goto :wantsTutorial
6153
if '%wantsTutorial%'=='Y' goto :wantsTutorial
@@ -70,7 +62,8 @@ goto :FirstTimeUser
7062

7163

7264
:noTutorial
73-
set /p isSureofNoTutorial= Are you sure?=
65+
echo.Are you sure?
66+
set /p isSureofNoTutorial=
7467
if not '%isSureofNoTutorial%'=='' set choice=%isSureofNoTutorial:~0,1%
7568
if '%isSureofNoTutorial%'=='y' goto :isSureofNoTutorial
7669
if '%isSureofNoTutorial%'=='Y' goto :isSureofNoTutorial
@@ -104,16 +97,20 @@ echo.>MainMenuTriggered.txt
10497
:Choice
10598
set choice=
10699
echo.
107-
echo 1: Go to the regular command line and run your own commands!
108-
echo 2: Test your internet connection by pinging Google!
109-
echo 3: Repair your system by running DISM and System File Checker!
100+
echo. 1: Go to the regular command line and run your own commands!
101+
echo. 2: Test your internet connection by pinging Google!
102+
echo. 3: Repair your system by running DISM and System File Checker!
103+
echo. 9: Access Help
110104
set /p choice= Your choice?=
111105
if not '%choice%'=='' set choice=%choice:~0,1%
112106
if '%choice%'=='1' goto :GoToRegularCMD
113107
if '%choice%'=='2' goto :PingGoogle
114108
if '%choice%'=='3' goto :DISMandSFC
115-
if '%choice%'=='4' goto :exit
116-
if '%choice%'=='9' goto :debug
109+
if '%choice%'=='exit' goto :exit
110+
if '%choice%'=='leave' goto :exit
111+
if '%choice%'=='die' goto :exit
112+
if '%choice%'=='debug' goto :debug
113+
if '%choice%'=='9' goto :Help
117114
ECHO "%choice%" is not a valid option, please try again.
118115
ECHO.
119116
goto :Choice
@@ -146,11 +143,19 @@ echo.====WARNING========WARNING=======WARNING=====
146143
echo.====WARNING========WARNING=======WARNING=====
147144
echo.THESE ARE DEBUG OPTIONS AND **CAN** BREAK THE PROGRAM!!
148145
echo.ARE YOU **101% POSITIVE** THAT YOU NEED THESE?
149-
set /p isSureOfDebugOptions=Say "I understand that the creator takes no responsibilty in what can happen if I, the user, breaks part of the program, by using explictly stated as options for DEBUGGING purposes."
150-
if '%isSureOfDebugOptions%'=='I understand that the creator takes no responsibilty in what can happen if I, the user, breaks part of the program, by using explictly stated as options for DEBUGGING purposes.'
151-
( echo.>WellThisWorks.txt
152-
goto :realDebug )
153-
else (goto :MainMenu)
146+
echo.
147+
echo.Say "I understand", to prove the you understand this aggreement: The creator takes no responsibilty in what can happen if I, the user, breaks part of the program, by using explictly stated as options for DEBUGGING purposes.
148+
set /p isSureOfDebugOptions=
149+
if '%isSureOfDebugOptions%'=='I understand' goto :realDebug
150+
if '%isSureOfDebugOptions%'=='i understand' goto :useBetterGrammarDebug
151+
goto :noDebug
152+
153+
154+
:noDebug
155+
echo No debug 4 u
156+
:: Causes about a 0.25 second pause
157+
ping techflash.ga -n 1 > nul
158+
goto :noDebug
154159

155160
:: Debug options don't exist as it would be accessible even if you didn't aggree to the terms.
156161

0 commit comments

Comments
 (0)