Advertisement
tolikpunkoff

Startup.cmd (From Hiren's Boot CD)

Feb 2nd, 2019
1,044
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.09 KB | None | 0 0
  1. @echo off
  2. title Startup
  3. set HBCD=HBCD
  4. :a
  5. for %%I in (C D E F G H I J K L M N O P Q R S T U V W X Y Z A B) DO (dir %%I:\ 1>nul 2>nul && if /i exist %%I:\HBCD\HBCDMenu.exe if /i exist %%I:\HBCD\Programs\7z.exe set HBCD=%%I:&goto k)
  6. if not "%ISO%"=="" goto h
  7. set ISO=none
  8. for /f "tokens=5 delims==" %%X in ('REG QUERY HKLM\SYSTEM\Controlset001\Control /v SystemStartOptions') do set ISO=%%X
  9. for %%I in (C D E F G H I J K L M N O P Q R S T U V W X Y Z A B) DO (dir "%%I:%ISO%" 1>nul 2>nul && imdisk -a -m #: -f "%%I:%ISO%"&nircmd wait 3000&goto a)
  10. :h
  11. if exist %Temp%\HWPnP.log goto s
  12. call pnpbatch all
  13. nircmd wait 2000
  14. goto a
  15. :s
  16. if not %showdh%!==! goto z
  17. showdrive /all
  18. nircmd wait 2000
  19. set showdh=1
  20. goto a
  21. :k
  22. call %HBCD%\HBCD\Boot\Keyboard.bat i
  23. if exist %HBCD%\HBCD\XP\Wallpaper.bmp REG ADD "HKCU\Control Panel\Desktop" /v Wallpaper /f /d %HBCD%\HBCD\XP\Wallpaper.bmp &RUNDLL32 user32.dll,UpdatePerUserSystemParameters
  24. ren %SystemRoot%\System32\prep Startup2.cmd
  25. mkdir "%ALLUSERSPROFILE%\Start Menu\Programs\Administrative Tools"
  26. copy /y %HBCD%\HBCD\Programs\7z.* %SystemRoot%\System32
  27. for %%a in (7Zip Teracopy DLL) do 7z x -y -o%SystemRoot%\System32 %HBCD%\HBCD\Programs\Files\%%a.7z
  28. nircmd shortcut "%HBCD%\HBCD\HBCDMenu.exe" "~$folder.desktop$" "HBCD Menu"
  29. call keyboard %keyboard%>nul
  30. for %%z in ("%USERPROFILE%\Start Menu\Programs" "%USERPROFILE%\Start Menu") do copy /y "%USERPROFILE%\Desktop\HBCD Menu.lnk" %%z
  31. for %%z in ("%USERPROFILE%\Start Menu\Programs\Disk Management.lnk" "%USERPROFILE%\Start Menu\Programs\Devices\Device Manager.lnk") do copy /y %%z "%ALLUSERSPROFILE%\Start Menu\Programs\Administrative Tools"
  32. (echo @echo off&echo set HBCD=%HBCD%&echo :s&echo setx HBCD %HBCD% -m&echo if not %%1!==! start /D%HBCD%\HBCD\Programs %%*&echo If /i Not Exist "%HBCD%\HBCD\HBCDMenu.exe" For %%%%I IN ^(C D E F G H I J K L M N O P Q R S T U V W X Y Z^) DO ^(If /i Exist "%%%%I:\HBCD\HBCDMenu.exe" set HBCD=%%%%I:^&goto s^))>%SystemRoot%\System32\HBCDP.cmd
  33. start "" /MIN cmd.exe /c Startup2.cmd
  34. :z
  35. del %SystemRoot%\System32\nt*krnl*.exe
  36. del %SystemDrive%\boot.sdi
  37. del /a %SystemDrive%\$wimdesc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement