Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- cd %temp%\CConsole
- if exist config.dat goto loadConfig
- set title=Custom Console (CConsole)
- set name=user
- goto skipLoad
- :loadConfig
- ren config.dat config.bat
- call config.bat
- ren config.bat config.dat
- title %title%
- :skipLoad
- if exist %temp%\CConsole\cmds cd %temp%\CConsole\cmds
- cls
- title %title%
- if not "%name%"=="user" goto skipLoad2
- cls
- :skipLoad2
- echo Hello %name%!
- echo.
- echo Welcome back to CConsole.
- echo.
- echo type "chelp" to read the default commands.
- echo.
- :s
- set /p c=^>
- if "%c%"=="" goto skipLoad2
- if "%c%"=="chelp" goto showHelp
- if "%c%"=="com" goto setCMD
- if "%c%"=="nam" goto setNAM
- if "%c%"=="des" goto doDES
- if "%c%"=="tit" goto setTIT
- if exist %temp%\CConsole\cmds\%c%.ccmd goto runCustomCMD
- %c%
- goto s
- :showHelp
- echo.
- echo Commands:
- echo.
- echo com (Setup a custom command)
- echo nam (Set up the name)
- echo des (Destroys the config file)
- echo tit (Set up the title)
- echo.
- set c=
- goto s
- :doDES
- echo.
- echo You called the "destroy service" for the config file.
- echo All things you typed in the console will be deleted.
- echo are you sure?
- echo.
- echo [y/n]
- echo (The cconsole will close it self if you agree.)
- echo (It will clear the ccmds too!)
- echo.
- choice /n /c:yn
- if errorlevel 1 if not errorlevel 2 goto agreeDES
- if errorlevel 2 if not errorlevel 3 goto disagreeDES
- :disagreeDES
- echo.
- echo You disagreed.
- echo.
- goto skipLoad2
- :agreeDES
- cd %temp%\CConsole\
- del config.dat
- cd cmds
- del /Q *.ccmd
- exit
- :setTIT
- echo.
- echo Please type the title.
- echo.
- set /p title=^>
- if "%title%"=="" goto skipLoad2
- echo You typed: %title% as the title.
- echo Is the title: %title%?
- echo.
- echo [y/n]
- echo.
- choice /n /c:yn
- if errorlevel 1 if not errorlevel 2 goto agreeNAMT
- if errorlevel 2 if not errorlevel 3 goto disagreeNAMT
- :disagreeNAMT
- echo.
- echo so the title is not %title%? okay. Retype it please.
- echo.
- goto setTIT
- :agreeNAMT
- cd %temp%\CConsole\
- if not exist config.dat goto createDatT
- goto skipCDatT
- :createDatT
- echo REM Generated by CConsole>config.dat
- :skipCDatT
- echo set title=%title%>>config.dat
- title %title%
- goto skipLoad2
- :setNAM
- echo.
- echo Please type your name.
- echo.
- set /p name=^>
- if "%name%"=="" goto skipLoad2
- echo You typed: %name% as your name.
- echo Is your name %name%?
- echo.
- echo [y/n]
- echo.
- choice /n /c:yn
- if errorlevel 1 if not errorlevel 2 goto agreeNAM
- if errorlevel 2 if not errorlevel 3 goto disagreeNAM
- :disagreeNAM
- echo.
- echo so your name is not %name%? okay. Retype it please.
- echo.
- goto setNAM
- :agreeNAM
- cd %temp%\CConsole\
- if not exist config.dat goto createDat
- goto skipCDat
- :createDat
- echo REM Generated by CConsole>config.dat
- :skipCDat
- echo set name=%name%>>config.dat
- goto skipLoad2
- :setCMD
- echo.
- echo Please type the name of your custom CMD
- echo or type "exit" to return to the menu.
- echo.
- set /p cx=^>
- if "%cx%"=="exit" goto skipLoad2
- if "%cx%"=="" goto setCMD
- echo You typed: "%cx%".
- echo Your custom command is %cx%
- echo are you agree with it?
- echo.
- echo [y/n]
- echo.
- choice /n /c:yn
- if errorlevel 1 if not errorlevel 2 goto agree
- if errorlevel 2 if not errorlevel 3 goto disagree
- :disagree
- echo.
- echo You disagreed please re-type your custom command.
- echo.
- goto setCMD
- :agree
- if "%skipOther%"=="1" goto agree2
- echo.
- echo Please enter the action.
- echo.
- :agreex
- set /p action=^>
- if "%action%"=="" goto agreex
- echo.
- echo You typed "%action%" as your action.
- echo.
- echo are you agree with it?
- echo.
- echo [y/n]
- echo.
- choice /n /c:yn
- if errorlevel 1 if not errorlevel 2 goto agree2
- if errorlevel 2 if not errorlevel 3 goto disagree2
- :disagree2
- echo.
- echo You disagreed please re-type your custom action.
- echo.
- goto agree
- :agree2
- echo.
- echo Your command: %cx%
- echo Your action: %action%
- echo.
- echo So if you type %cx% in the CConsole it will run %action%.
- echo.
- echo are you agree with it?
- echo.
- echo [y/n]
- echo.
- choice /n /c:yn
- if errorlevel 1 if not errorlevel 2 goto agree3
- if errorlevel 2 if not errorlevel 3 goto disagree3
- :disagree3
- echo.
- echo You disagreed.
- echo What do you want to change?
- echo.
- echo [1] Command
- echo [2] Action
- choice /n /c:12
- if errorlevel 1 if not errorlevel 2 goto prepairEditCommand
- if errorlevel 2 if not errorlevel 3 goto prepairEditAction
- :prepairEditCommand
- set skipOther=1
- goto setCMD
- :prepairEditAction
- goto agreex
- :agree3
- cd %temp%
- if not exist CConsole md CConsole
- cd CConsole
- if not exist cmds md cmds
- cd cmds
- echo set cx=%cx%>%cx%.ccmd
- echo set action=%action%>>%cx%.ccmd
- echo.
- echo CMD was saved as %temp%\CConsole\cmds\%cx%.ccmd
- echo.
- goto skipLoad2
- :runCustomCMD
- ren %c%.ccmd %c%.bat
- call %c%.bat
- ren %c%.bat %c%.ccmd
- %action%
- echo.
- goto skipLoad2
Advertisement
Add Comment
Please, Sign In to add comment