代码里涉及注册表,可以删除,不影响复制代码
- @echo off
- set work=0
- set n=0
- set mo=0
- set number=0
- set all=5
- mode con cols=70 lines=30
- title MICRODOS V24.0 22H2 SETUP
- :window
- mode con cols=120 lines=40
- color 17
- cls
- echo.
- echo MICRODOS 24.0 22H2 SETUP
- echo ===================
- echo.
- echo [1].Install MICRODOS v24.0 22H2
- echo.
- echo [2].Uninstall MICRODOS v24.0 22H2
- echo.
- echo [3].Reset the MICRODOS v24.0 22H2
- echo.
- echo [4].Repair MICRODOS v24.0 22H2
- echo.
- echo [Q].EXIT
- echo.
- :choose
- set /p a=Please enter the code:
- if "%a%"=="1" goto :1
- if "%a%"=="2" goto :2
- if "%a%"=="3" goto :3
- if "%a%"=="4" goto :4
- if /i "%a%"=="q" exit /b
- cls
- echo ERROR
- pause>nul
- goto :window
- :1
- set work=0
- set n=0
- set mo=0
- set number=0
- set all=5
- cls
- echo.
- set /p programpath=Where do you want to install the software(Absolute path):
- echo The installation time will take about two minutes, please be patient.
- choice /t "3" /d y /n >nul
- :4b
- cd /d "%programpath%"
- cls
- echo Start instrall!
- :show
- :check
- if %number% GTR %mo% set num=%num%��&set /a mo=%mo%+1&goto check
- cls
- echo Uninstalling the previous version!
- echo.
- echo %n% / %all% completed.
- echo.
- echo Completed: %work% %%%
- echo \----------------------------------------------------------------------------------------------------/
- echo.
- echo.
- echo.
- echo.
- echo /----------------------------------------------------------------------------------------------------\
- choice /t "2" /d y /n >nul
- if exist MICRODOS (
- rd /s /q MICRODOS
- reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MICRODOS v24.0" /f
- pause>nul
- md MICRODOS
- goto :1pathnext
- ) else if not exist MICRODOS (
- md MICRODOS
- goto :1pathnext
- )
- :1pathnext
- set /a n=%n%+1
- set /a work=(%n%)*100/(%all%)
- set /a number=%work%/1
- set /a number=%number%
- :check2
- if %number% GTR %mo% set num=%num%��&set /a mo=%mo%+1&goto check2
- cls
- echo The new file is being copied!
- echo.
- echo %n% / %all% completed.
- echo.
- echo Completed: %work% %%%
- echo \----------------------------------------------------------------------------------------------------/
- echo.
- if not "%num%"=="" echo %num%
- if not "%num%"=="" echo %num%
- echo.
- echo /----------------------------------------------------------------------------------------------------\
- choice /t "2" /d y /n >nul
- cd /d MICRODOS
- md data
- md Mod
- md Memorandum
- copy "%~dp0\EFI\MICRODOS Version 24.0 22H2.exe" "%cd%"
- copy "%~dp0\EFI\update.log" "%cd%"
- copy "%~dp0\EFI\urini.ini" "%cd%\data"
- copy "%~dp0\EFI\WindowsSerial.ini" "%cd%\data"
- copy "%~dp0\EFI\UNINSTALL.exe" "%cd%"
- cd /d "%programpath%"
- set /a n=%n%+1
- set /a work=(%n%)*100/(%all%)
- set /a number=%work%/1
- set /a number=%number%
- :check3
- if %number% GTR %mo% set num=%num%��&set /a mo=%mo%+1&goto check3
- cls
- echo Installing shortcuts!
- echo.
- echo %n% / %all% completed.
- echo.
- echo Completed: %work% %%%
- echo \----------------------------------------------------------------------------------------------------/
- echo.
- if not "%num%"=="" echo %num%
- if not "%num%"=="" echo %num%
- echo.
- echo /----------------------------------------------------------------------------------------------------\
- choice /t "2" /d y /n >nul
- echo set WshShell = WScript.CreateObject("WScript.Shell")>setup.vbs
- echo strDesktop = WshShell.SpecialFolders("Desktop")>>setup.vbs
- echo set oShellLink = WshShell.CreateShortcut(strDesktop ^& "\MICRODOS Version 24.0 22H2.lnk")>>setup.vbs
- echo oShellLink.TargetPath ="%programpath%\MICRODOS\MICRODOS Version 24.0 22H2">>setup.vbs
- echo oShellLink.WorkingDirectory = strDesktop>>setup.vbs
- echo oShellLink.IconLocation = "%programpath%\MICRODOS\MICRODOS Version 24.0 22H2", 0>>setup.vbs
- echo oShellLink.Save>>setup.vbs
- call setup.vbs
- cls
- del /f /q setup.vbs
- set /a n=%n%+1
- set /a work=(%n%)*100/(%all%)
- set /a number=%work%/1
- set /a number=%number%
- :check4
- if %number% GTR %mo% set num=%num%��&set /a mo=%mo%+1&goto check4
- cls
- echo Installing the registry!
- echo.
- echo %n% / %all% completed.
- echo.
- echo Completed: %work% %%%
- echo \----------------------------------------------------------------------------------------------------/
- echo.
- if not "%num%"=="" echo %num%
- if not "%num%"=="" echo %num%
- echo.
- echo /----------------------------------------------------------------------------------------------------\
- choice /t "2" /d y /n >nul
- set "ProgramName=MICRODOS v24.0 22H2"
- set "ProgramDisplayName=MICRODOS Version 24.0 22H2"
- set "UninstallString=%programpath%\MICRODOS\UNINSTALL.exe"
- reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProgramName%" /f
- reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProgramName%" /v "DisplayName" /d "%ProgramDisplayName%" /f
- reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProgramName%" /v "UninstallString" /d "%UninstallString%" /f
- reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProgramName%" /v "Publisher" /d "REMIX LASER RISING STUDIO" /f
- reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProgramName%" /v "DisplayIcon" /d "%programpath%\MICRODOS\MICRODOS Version 24.0 22H2.exe" /f
- reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProgramName%" /v "DisplayVersion" /d "22H2 24.0.23629.1612" /f
- reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProgramName%" /v "EstimatedSize" /t "REG_DWORD" /d "1850" /f
- cls
- set /a n=%n%+1
- set /a work=(%n%)*100/(%all%)
- set /a number=%work%/1
- set /a number=%number%
- :check5
- if %number% GTR %mo% set num=%num%��&set /a mo=%mo%+1&goto check5
- cls
- echo Completing Installation! PLEASE,WAIT!
- echo.
- echo %n% / %all% completed.
- echo.
- echo Completed: %work% %%%
- echo \----------------------------------------------------------------------------------------------------/
- echo.
- if not "%num%"=="" echo %num%
- if not "%num%"=="" echo %num%
- echo.
- echo /----------------------------------------------------------------------------------------------------\
- choice /t "5" /d y /n >nul
- cls
- set /a n=%n%+1
- set /a work=(%n%)*100/(%all%)
- set /a number=%work%/1
- set /a number=%number%
- :check6
- if %number% GTR %mo% set num=%num%��&set /a mo=%mo%+1&goto check6
- cls
- echo Finish Install!
- echo.
- echo %n% / %all% completed.
- echo.
- echo Completed: %work% %%%
- echo \----------------------------------------------------------------------------------------------------/
- echo.
- if not "%num%"=="" echo %num%
- if not "%num%"=="" echo %num%
- echo.
- echo /----------------------------------------------------------------------------------------------------\
- choice /t "2" /d y /n >nul
- echo Please push any key to continue
- pause>nul
- goto :window
复制代码
- :2
- cls
- echo.
- set /p programpath=Where did you installed the software(Absolute path):
- cd /d "%programpath%"
- if not exist "MICRODOS" (
- cls
- echo You have not install MICRODOS!
- echo Please push any key to continue
- pause>nul
- goto :window
- ) else cls
- :2a
- echo ARE YOU SURE YOU WANT TO UNINSTALL MICRODOS?(Y/N)
- set /p a=^>
- if /i "%a%"=="y" goto :uninstall
- if /i "%a%"=="n" goto :window
- goto :2a
- :uninstall
- echo MICRODOS Version 24.0 is being completely removed from your computer!
- echo It is about a few seconds.PLEASE.WAIT!
- rd /q /s MICRODOS
- reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MICRODOS v24.0 22H2" /f
- echo Uninstall complete!
- echo Please push any key to continue!
- pause>nul
- goto :window
- :3
- cls
- echo.
- set /p programpath=Where did you installed the software(Absolute path):
- cd /d "%programpath%"
- if not exist "MICRODOS" (
- cls
- echo You have not install MICRODOS!
- echo Please push any key to continue
- pause>nul
- goto :window
- ) else cls
- echo:Resetting MICRODOS will lose everything you did at MICRODOS, including your mods, login data, saved activation codes, and if you want to continue using these after the reset, you can back them up somewhere other then the installation path and restore them to their original location after the MICRODOS reset is complete.
- echo NOW YOU ALSO HAVE TIME TO EXIT IF YOU HAVE WRONG ENTER!
- echo PLEASE HURRY UP EXIT IN 10 SECONDS!
- choice /t "10" /d y /n >nul
- rd /q /s MICRODOS
- echo going to install...
- choice /t "1" /d y /n >nul
- set work=0
- set n=0
- set mo=0
- set number=0
- set all=5
- goto :4b
- :4
- cls
- echo.
- set /p programpath=Where did you installed the software(Absolute path):
- cd /d "%programpath%"
- if not exist MICRODOS (
- echo You haven't install MICRODOS yet!
- pause>nul
- goto :window
- )
- :4a
- cls
- echo.
- echo Please choose what you want to repair!
- echo.
- echo [1] MICRODOS v24.0 22H2
- echo.
- echo [2] WindowsSerial.ini
- echo.
- echo [3] update.log
- echo.
- echo [4] UNINSTALL.exe
- echo.
- echo [Q] EXIT
- echo.
- set /p repair=What your choose:
- if "%repair%" equ "1" (
- del "%programpath%\MICRODOS\MICRODOS Version 24.0 22H2.exe"
- cd /d "%~dp0\EFI"
- copy "MICRODOS Version 24.0 22H2.exe" "%programpath%\MICRODOS"
- cls
- echo Repair Complete!
- pause>nul
- goto :4a
- ) else if "%repair%" equ "2" (
- del "%programpath%\MICRODOS\data\WindowsSerial.ini"
- cd /d "%~dp0\EFI"
- copy "WindowsSerial.ini" "%programpath%\MICRODOS\data"
- cls
- echo Repair Complete!
- pause>nul
- goto :4a
- ) else if "%repair%" equ "3" (
- del "%programpath%\MICRODOS\update.log"
- cd /d "%~dp0\EFI"
- copy "update.log" "%programpath%\MICRODOS"
- cls
- echo Repair Complete!
- pause>nul
- goto :4a
- ) else if "%repair%" equ "4" (
- del "%programpath%\MICRODOS\UNINSTALL.exe"
- cd /d "%~dp0\EFI"
- copy "UNINSTALL.exe" "%programpath%\MICRODOS"
- cls
- echo Repair Complete!
- pause>nul
- goto :4a
- ) else if /i "%repair%" equ "q" (
- goto :window
- ) else goto :4a
复制代码
- set work=0
- set n=0
- set mo=0
- set number=0
- set all=5
- :show
- :check
- if %number% GTR %mo% set num=%num%��&set /a mo=%mo%+1&goto check
- cls
- echo Uninstalling the previous version!
- echo.
- echo %n% / %all% completed.
- echo.
- echo Completed: %work% %%%
- echo \----------------------------------------------------------------------------------------------------/
- echo.
- echo.
- echo.
- echo.
- echo /----------------------------------------------------------------------------------------------------\
欢迎光临 批处理之家 (http://www.bathome.net/) | Powered by Discuz! 7.2 |