Skip to content

Commit 82bd29f

Browse files
committed
Somehow added 1kb in a few minutes ¯\_(ツ)_/¯
1 parent e212c69 commit 82bd29f

File tree

1 file changed

+67
-18
lines changed

1 file changed

+67
-18
lines changed

AutoRunWithCMD.cmd

Lines changed: 67 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,52 @@ if '%choiceForDangerousAutoRun%'=='S' goto :MakeSystemRestorePoint
108108
if '%choiceForDangerousAutoRun%'=='C' goto :saferSetAutoRun2
109109
if '%choiceForDangerousAutoRun%'=='c' goto :saferSetAutoRun2
110110
if '%choiceForDangerousAutoRun%'=='1' goto :FirstTimeUser
111-
echo."%choiceForDangerousAutoRun%" is not valid, please try again.
111+
cls
112+
echo."%choiceForDangerousAutoRun%" is not a valid option, please try again.
113+
echo.
112114
goto :saferSetAutoRun
113115

114116
:saferSetAutoRun2
115117
@echo off
116118
cls
117119
set AppendToPath='%appdata%\Sanikdah Software\Ease of Use Command Prompt Auto Run Script'
118-
ping techflash.ga -n 2 > nul
119-
:: Wastes time so that the variable 100% has enough time to update
120+
echo.Wasting time so that we are 100% certain that the variable has updated before continuing, please wait.....
121+
ping techflash.ga -n 6 > nul
122+
:: Wastes time so that the variable 100% has enough time to update to prevent breaking of computers.
120123
echo.Setting everything...
121124
set "PATH=%AppendToPath%;%PATH%"
122-
echo.Done! Restart your computer for it to work!
123-
goto :MainMenu
125+
echo.Done! Please save any work and restart your computer for it to work!
126+
echo.Would you like to have the script restart your PC for you?
127+
set /p doesRestart=
128+
if not '%doesRestart%'=='' set doesRestart=%doesRestart:~0,1%
129+
if '%doesRestart%'=='y' (
130+
shutdown /t 20 /r
131+
echo.Restarting in 20 seconds!
132+
)
133+
if '%doesRestart%'=='Y' (
134+
shutdown /t 20 /r
135+
echo.Restarting in 20 seconds!
136+
)
137+
if '%doesRestart%'=='n' (
138+
echo.Going back to the menu!
139+
timeout 5
140+
cls
141+
goto :MainMenu
142+
)
143+
if '%doesRestart%'=='N' (
144+
echo.Going back to the menu!
145+
timeout 5
146+
cls
147+
goto :MainMenu
148+
)
149+
cls
150+
echo."%doesRestart%" is not a valid option, please try again.
151+
echo.
152+
goto :saferSetAutoRun2
124153

125154

126-
@echo off
127155
:FirstTimeUser2
156+
@echo off
128157
title Do you want a tutorial?
129158
echo.Hey! You seem like you ran this program for the first time! Would you like a tutorial on how to use the program?
130159
set /p wantsTutorial=
@@ -148,7 +177,9 @@ if '%wantsTutorial%'=='n' goto :noTutorial
148177
if '%wantsTutorial%'=='N' goto :noTutorial
149178
if '%wantsTutorial%'=='no' goto :noTutorial
150179
if '%wantsTutorial%'=='No' goto :noTutorial
151-
ECHO. "%wantsTutorial%" is not a valid option, please try again.
180+
cls
181+
echo."%wantsTutorial%" is not a valid option, please try again.
182+
echo.
152183
goto :FirstTimeUser
153184

154185

@@ -160,9 +191,11 @@ if '%isSureofNoTutorial%'=='y' goto :isSureofNoTutorial
160191
if '%isSureofNoTutorial%'=='Y' goto :isSureofNoTutorial
161192
if '%isSureofNoTutorial%'=='n' goto :FirstTimeUser
162193
if '%isSureofNoTutorial%'=='N' goto :FirstTimeUser
163-
ECHO. "%isSureofNoTutorial%" is not a valid option, please try again.
194+
cls
195+
echo."%isSureofNoTutorial%" is not a valid option, please try again.
196+
echo.
164197
goto :noTutorial
165-
ECHO.
198+
166199

167200
:isSureofNoTutorial
168201
cls
@@ -208,8 +241,9 @@ if '%choice%'=='5= goto :CheckNetworkStatistics
208241
if '%choice%'=='0' goto :debug
209242
if '%choice%'=='8' goto :Settings
210243
if '%choice%'=='9' goto :Help
211-
ECHO "%choice%" is not a valid option, please try again.
212-
ECHO.
244+
cls
245+
echo."%choice%" is not a valid option, please try again.
246+
echo.
213247
goto :Choice
214248
echo.>EndOfChoiceTriggered.txt
215249

@@ -226,8 +260,7 @@ echo.2. Click on "Create".
226260
echo.3. Go through the steps of creating the restore point.
227261
echo.Press any key when you are done.
228262
pause
229-
cls
230-
goto :MainMenu
263+
goto :ClearAndMenu
231264

232265
:Help
233266
@echo off
@@ -246,6 +279,9 @@ if not '%HelpChoice%'=='' set HelpChoice=%HelpChoice:~0,1%
246279
if '%HelpChoice%'=='1' goto :ClearAndMenu
247280
if '%HelpChoice%'=='2' goto :wantsTutorial
248281
if '%HelpChoice%'=='3' goto :Links
282+
cls
283+
echo."%HelpChoice%" is not a valid option, please try again.
284+
goto :Help
249285

250286
:Links
251287
@echo off
@@ -269,6 +305,7 @@ if '%LinkChoice%'=='4' start "" https://youtube.com/channel/UCZNRlvLcjqN8nw6YO73
269305
if '%LinkChoice%'=='5' start "" https://github.com/sanikdah/
270306
if '%LinkChoice%'=='6' start "" https://discord.com/invite/FnseMDFBH6
271307
if '%LinkChoice%'=='7' start "" https://twitch.tv/sanikdahh
308+
cls
272309
echo "%LinkChoice%" is not a valid option, please try again.
273310
echo.
274311
goto :Links
@@ -329,6 +366,8 @@ if '%isSureOfDebugOptions%'=='y' goto :realDebug
329366
if '%isSureOfDebugOptions%'=='Y' goto :realDebug
330367
if '%isSureOfDebugOptions%'=='n' goto :noDebug
331368
if '%isSureOfDebugOptions%'=='N' goto :noDebug
369+
cls
370+
echo."%isSureOfDebugOptions%" is not a valid option, please try again.
332371
goto :noDebug
333372

334373

@@ -340,11 +379,21 @@ goto :MainMenu
340379

341380
:realDebug
342381
@echo off
343-
echo.
344-
echo Nothing here yet, currently working on the main menu.
345-
echo.Press any key to go back to the Main menu.
346-
pause
347-
goto :MainMenu
382+
echo.Severly untested options.
383+
echo. 1. Go back to the main menu.
384+
echo. 2. Jump directly to any batch label in the script. (Some maybe be intentionally hidden due to being unfinished!)
385+
echo. 3. The super dangerous stuff (potentially script or **ENTIRE PC BREAKING**)
386+
echo.Which do you want to do?
387+
set /p debugChoice=
388+
if not '%debugChoice%'=='' set debugChoice=%debugChoice:~0,1%
389+
if '%debugChoice%'=='1' goto :MainMenu
390+
if '%debugChoice%'=='2' goto :gotoAnyBatchLabel
391+
if '%debugChoice%'=='3' goto :DangerousDebug
392+
cls
393+
echo."%debugChoice%" is not a valid option, please try again.
394+
goto :realDebug
395+
396+
goto :realDebug
348397

349398
:: Settings menu
350399
:Settings

0 commit comments

Comments
 (0)