Skip to content

Commit dcabf3d

Browse files
committed
Update AutoRunWithCMD.cmd
Add a basic prompt screen for debug options, as the comment by it says, the options don't exist because the prompt is somehow broken.
1 parent 27409a5 commit dcabf3d

File tree

1 file changed

+44
-6
lines changed

1 file changed

+44
-6
lines changed

AutoRunWithCMD.cmd

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
:: Sets the color, disables command feedback, and clears the screen of the version and whatnot text.
22
@echo off
3+
cls
34
color 0a
45
:: Debug stuff, making a place for logs
56
if exist "Debug" (
@@ -32,12 +33,12 @@ if exist "Ease of Use Command Prompt Auto Run Script" (
3233
goto :FirstTimeUser
3334
)
3435
:EoUCPARS-FolderExists
35-
echo.Launched.txt
36+
echo.>Launched.txt
3637

3738
:: Launches if the previous code detects that this is your first time launching the program
3839
:FirstTimeUser
3940
title Do you want a tutorial?
40-
echo. Hey! You seem like you ran this program for the first time! Would you like a tutorial on how to navigate?
41+
echo.Hey! You seem like you ran this program for the first time! Would you like a tutorial on how to navigate?
4142
set /p wantsTutorial= Do you want a tutorial?=
4243
if not '%wantsTutorial%'=='' set choice=%wantsTutorial:~0,1%
4344
if '%wantsTutorial%'=='y' goto :wantsTutorial
@@ -49,10 +50,24 @@ if '%wantsTutorial%'=='N' goto :noTutorial
4950
if '%wantsTutorial%'=='no' goto :noTutorial
5051
if '%wantsTutorial%'=='No' goto :noTutorial
5152
ECHO. "%wantsTutorial%" is not a valid option, please try again.
53+
goto :FirstTimeUser
5254
ECHO.
5355

5456
:wantsTutorial
55-
echo. Placeholder tutorial
57+
echo.Placeholder tutorial.
58+
set /p wantsTutorial= Do you want to see the tutorial again?
59+
if not '%wantsTutorial%'=='' set choice=%wantsTutorial:~0,1%
60+
if '%wantsTutorial%'=='y' goto :wantsTutorial
61+
if '%wantsTutorial%'=='Y' goto :wantsTutorial
62+
if '%wantsTutorial%'=='Yes' goto :wantsTutorial
63+
if '%wantsTutorial%'=='yes' goto :wantsTutorial
64+
if '%wantsTutorial%'=='n' goto :noTutorial
65+
if '%wantsTutorial%'=='N' goto :noTutorial
66+
if '%wantsTutorial%'=='no' goto :noTutorial
67+
if '%wantsTutorial%'=='No' goto :noTutorial
68+
ECHO. "%wantsTutorial%" is not a valid option, please try again.
69+
goto :FirstTimeUser
70+
5671

5772
:noTutorial
5873
set /p isSureofNoTutorial= Are you sure?=
@@ -66,9 +81,11 @@ if '%isSureofNoTutorial%'=='N' goto :FirstTimeUser
6681
if '%isSureofNoTutorial%'=='no' goto :FirstTimeUser
6782
if '%isSureofNoTutorial%'=='No' goto :FirstTimeUser
6883
ECHO. "%isSureofNoTutorial%" is not a valid option, please try again.
84+
goto :noTutorial
6985
ECHO.
7086

7187
:isSureofNoTutorial
88+
cls
7289
echo Alright, just go to Help (5) and then Tutorial (2) to view it if you ever want to!
7390
goto :MainMenu
7491

@@ -96,6 +113,7 @@ if '%choice%'=='1' goto :GoToRegularCMD
96113
if '%choice%'=='2' goto :PingGoogle
97114
if '%choice%'=='3' goto :DISMandSFC
98115
if '%choice%'=='4' goto :exit
116+
if '%choice%'=='9' goto :debug
99117
ECHO "%choice%" is not a valid option, please try again.
100118
ECHO.
101119
goto :Choice
@@ -108,14 +126,34 @@ goto :leave
108126
echo.>EndOfGoToRegualarCMDTriggered.txt
109127

110128
:PingGoogle
111-
@echo on
129+
@echo off
112130
title Pinging Google......
113131
ping google.com -n 1 >PingStats.txt
114-
if !errorlevel!==0 set InternetState=up else set InternetState=down
115-
echo. Internet is %InternetState%!
132+
if %errorlevel%==0 (set InternetState=up) else (set InternetState=down)
133+
cls
134+
echo.
135+
echo.Internet is %InternetState%!
116136
goto :MainMenu
117137
echo.>EndOfPingGoogleTriggered.txt
118138

139+
140+
::Debug options, to be accessible by those who know exactly what they are doing
141+
:debug
142+
@echo off
143+
cls
144+
echo.====WARNING========WARNING=======WARNING=====
145+
echo.====WARNING========WARNING=======WARNING=====
146+
echo.====WARNING========WARNING=======WARNING=====
147+
echo.THESE ARE DEBUG OPTIONS AND **CAN** BREAK THE PROGRAM!!
148+
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)
154+
155+
:: Debug options don't exist as it would be accessible even if you didn't aggree to the terms.
156+
119157
:: Simplest one of them all, exits the shell
120158
:exit
121159
exit

0 commit comments

Comments
 (0)