Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- title Startup
- set HBCD=HBCD
- :a
- 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)
- if not "%ISO%"=="" goto h
- set ISO=none
- for /f "tokens=5 delims==" %%X in ('REG QUERY HKLM\SYSTEM\Controlset001\Control /v SystemStartOptions') do set ISO=%%X
- 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)
- :h
- if exist %Temp%\HWPnP.log goto s
- call pnpbatch all
- nircmd wait 2000
- goto a
- :s
- if not %showdh%!==! goto z
- showdrive /all
- nircmd wait 2000
- set showdh=1
- goto a
- :k
- call %HBCD%\HBCD\Boot\Keyboard.bat i
- 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
- ren %SystemRoot%\System32\prep Startup2.cmd
- mkdir "%ALLUSERSPROFILE%\Start Menu\Programs\Administrative Tools"
- copy /y %HBCD%\HBCD\Programs\7z.* %SystemRoot%\System32
- for %%a in (7Zip Teracopy DLL) do 7z x -y -o%SystemRoot%\System32 %HBCD%\HBCD\Programs\Files\%%a.7z
- nircmd shortcut "%HBCD%\HBCD\HBCDMenu.exe" "~$folder.desktop$" "HBCD Menu"
- call keyboard %keyboard%>nul
- for %%z in ("%USERPROFILE%\Start Menu\Programs" "%USERPROFILE%\Start Menu") do copy /y "%USERPROFILE%\Desktop\HBCD Menu.lnk" %%z
- 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"
- (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
- start "" /MIN cmd.exe /c Startup2.cmd
- :z
- del %SystemRoot%\System32\nt*krnl*.exe
- del %SystemDrive%\boot.sdi
- del /a %SystemDrive%\$wimdesc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement