Unix line endings to dos
parent
56c60fbae3
commit
90ccdeb8e6
|
|
@ -1,106 +1,106 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec /bin/bash "$(dirname "$0")"/bootinst.sh
|
exec /bin/bash "$(dirname "$0")"/bootinst.sh
|
||||||
exec /bin/sh "$(dirname "$0")"/bootinst.sh
|
exec /bin/sh "$(dirname "$0")"/bootinst.sh
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
COLOR 2F
|
COLOR 2F
|
||||||
cls
|
cls
|
||||||
echo ===============================================================================
|
echo ===============================================================================
|
||||||
echo.
|
echo.
|
||||||
echo ________.__
|
echo ________.__
|
||||||
echo / ____/^| ^| _____ ___ ___
|
echo / ____/^| ^| _____ ___ ___
|
||||||
echo \____ \ ^| ^| \__ \ \ \/ /
|
echo \____ \ ^| ^| \__ \ \ \/ /
|
||||||
echo / \^| ^|__/ __ \_^> ^<
|
echo / \^| ^|__/ __ \_^> ^<
|
||||||
echo /______ /^|____(____ /__/\_ \
|
echo /______ /^|____(____ /__/\_ \
|
||||||
echo \/ \/ \/
|
echo \/ \/ \/
|
||||||
echo.
|
echo.
|
||||||
echo ===============================================================================
|
echo ===============================================================================
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
set DISK=none
|
set DISK=none
|
||||||
set BOOTFLAG=boot666s.tmp
|
set BOOTFLAG=boot666s.tmp
|
||||||
|
|
||||||
:checkPrivileges
|
:checkPrivileges
|
||||||
mkdir "%windir%\AdminCheck" 2>nul
|
mkdir "%windir%\AdminCheck" 2>nul
|
||||||
if '%errorlevel%' == '0' rmdir "%windir%\AdminCheck" & goto gotPrivileges else goto getPrivileges
|
if '%errorlevel%' == '0' rmdir "%windir%\AdminCheck" & goto gotPrivileges else goto getPrivileges
|
||||||
|
|
||||||
:getPrivileges
|
:getPrivileges
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO Administrator Rights are required
|
ECHO Administrator Rights are required
|
||||||
ECHO Invoking UAC for Privilege Escalation
|
ECHO Invoking UAC for Privilege Escalation
|
||||||
ECHO.
|
ECHO.
|
||||||
runadmin.vbs %0
|
runadmin.vbs %0
|
||||||
goto end
|
goto end
|
||||||
|
|
||||||
:gotPrivileges
|
:gotPrivileges
|
||||||
CD /D "%~dp0"
|
CD /D "%~dp0"
|
||||||
|
|
||||||
echo This file is used to determine current drive letter. It should be deleted. >\%BOOTFLAG%
|
echo This file is used to determine current drive letter. It should be deleted. >\%BOOTFLAG%
|
||||||
if not exist \%BOOTFLAG% goto readOnly
|
if not exist \%BOOTFLAG% goto readOnly
|
||||||
|
|
||||||
echo.|set /p=wait please
|
echo.|set /p=wait please
|
||||||
for %%d 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 echo.|set /p=. & if exist %%d:\%BOOTFLAG% set DISK=%%d
|
for %%d 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 echo.|set /p=. & if exist %%d:\%BOOTFLAG% set DISK=%%d
|
||||||
echo . . . . . . . . . .
|
echo . . . . . . . . . .
|
||||||
del \%BOOTFLAG%
|
del \%BOOTFLAG%
|
||||||
if %DISK% == none goto DiskNotFound
|
if %DISK% == none goto DiskNotFound
|
||||||
|
|
||||||
wscript.exe samedisk.vbs %windir% %DISK%
|
wscript.exe samedisk.vbs %windir% %DISK%
|
||||||
if %ERRORLEVEL% == 99 goto refuseDisk
|
if %ERRORLEVEL% == 99 goto refuseDisk
|
||||||
|
|
||||||
echo Setting up boot record for %DISK%: ...
|
echo Setting up boot record for %DISK%: ...
|
||||||
|
|
||||||
if %OS% == Windows_NT goto setupNT
|
if %OS% == Windows_NT goto setupNT
|
||||||
goto setup95
|
goto setup95
|
||||||
|
|
||||||
:setupNT
|
:setupNT
|
||||||
\slax\boot\syslinux.exe -maf -d /slax/boot/ %DISK%:
|
\slax\boot\syslinux.exe -maf -d /slax/boot/ %DISK%:
|
||||||
if %ERRORLEVEL% == 0 goto setupEFI
|
if %ERRORLEVEL% == 0 goto setupEFI
|
||||||
goto errorFound
|
goto errorFound
|
||||||
|
|
||||||
:setup95
|
:setup95
|
||||||
\slax\boot\syslinux.com -maf -d /slax/boot/ %DISK%:
|
\slax\boot\syslinux.com -maf -d /slax/boot/ %DISK%:
|
||||||
if %ERRORLEVEL% == 0 goto setupEFI
|
if %ERRORLEVEL% == 0 goto setupEFI
|
||||||
goto errorFound
|
goto errorFound
|
||||||
|
|
||||||
:setupEFI
|
:setupEFI
|
||||||
mkdir %DISK%:\EFI\Boot
|
mkdir %DISK%:\EFI\Boot
|
||||||
copy \slax\boot\EFI\Boot\* %DISK%:\EFI\Boot
|
copy \slax\boot\EFI\Boot\* %DISK%:\EFI\Boot
|
||||||
goto setupDone
|
goto setupDone
|
||||||
|
|
||||||
:setupDone
|
:setupDone
|
||||||
echo Installation finished.
|
echo Installation finished.
|
||||||
goto pauseit
|
goto pauseit
|
||||||
|
|
||||||
:errorFound
|
:errorFound
|
||||||
color 4F
|
color 4F
|
||||||
echo.
|
echo.
|
||||||
echo Error installing boot loader
|
echo Error installing boot loader
|
||||||
goto pauseit
|
goto pauseit
|
||||||
|
|
||||||
:refuseDisk
|
:refuseDisk
|
||||||
color 4F
|
color 4F
|
||||||
echo.
|
echo.
|
||||||
echo Directory %DISK%:\slax\boot\ seems to be on the same physical disk as your Windows.
|
echo Directory %DISK%:\slax\boot\ seems to be on the same physical disk as your Windows.
|
||||||
echo Installing bootloader would harm your Windows and thus is disabled.
|
echo Installing bootloader would harm your Windows and thus is disabled.
|
||||||
echo Please use different drive and try again.
|
echo Please use different drive and try again.
|
||||||
goto pauseit
|
goto pauseit
|
||||||
|
|
||||||
:readOnly
|
:readOnly
|
||||||
color 4F
|
color 4F
|
||||||
echo.
|
echo.
|
||||||
echo You're starting this installer from a read-only media, this will not work.
|
echo You're starting this installer from a read-only media, this will not work.
|
||||||
goto pauseit
|
goto pauseit
|
||||||
|
|
||||||
:DiskNotFound
|
:DiskNotFound
|
||||||
color 4F
|
color 4F
|
||||||
echo.
|
echo.
|
||||||
echo Error: can't discover current drive letter
|
echo Error: can't discover current drive letter
|
||||||
|
|
||||||
:pauseit
|
:pauseit
|
||||||
if "%1" == "auto" goto end
|
if "%1" == "auto" goto end
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo Press any key...
|
echo Press any key...
|
||||||
pause > nul
|
pause > nul
|
||||||
|
|
||||||
:end
|
:end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue