home *** CD-ROM | disk | FTP | other *** search
- cls
- @echo off
- echo.
- echo Installation of Lnx4Win
- echo This program will install all necessary files for Linux4win on your harddisk.
- echo.
- echo.
- echo Press any key to continue.
- echo Press CTRL-C to stop this program.
- echo.
- pause>nul
-
- choice /c:defgh /N Please chose the drive letter of your CD-Rom :
- if errorlevel=5 goto cdr_h
- if errorlevel=4 goto cdr_g
- if errorlevel=3 goto cdr_f
- if errorlevel=2 goto cdr_e
- if errorlevel=1 goto cdr_d
-
- :cdr_d
- set origine=D:\lnx4win\*.*
- if exist "D:\*.*" goto verif
- if exist "D:\"nul goto verif
- echo Invalid CD-Rom drive !
- goto fin
-
- :cdr_e
- set origine=E:\lnx4win\*.*
- if exist "E:\*.*" goto verif
- if exist "E:\"nul goto verif
- echo Invalid CD-Rom drive !
- goto fin
-
- :cdr_f
- set origine=F:\lnx4win\*.*
- if exist "F:\*.*" goto verif
- if exist "F:\"nul goto verif
- echo Invalid CD-Rom drive !
- goto fin
-
- :cdr_g
- set origine=G:\lnx4win\*.*
- if exist "G:\*.*" goto verif
- if exist "G:\"nul goto verif
- echo Invalid CD-Rom drive !
- goto fin
-
- :cdr_h
- set origine=H:\lnx4win\*.*
- if exist "H:\*.*" goto verif
- if exist "H:\"nul goto verif
- echo Invalid CD-Rom drive !
- goto fin
-
- :verif
- if exist %origine% goto destination
- echo Please insert the right CD-Rom !
- goto fin
-
- :destination
- choice /c:cdefg /N Please choose the partition letter where Linux4Win will be installed :
- if errorlevel=5 goto dsk_g
- if errorlevel=4 goto dsk_f
- if errorlevel=3 goto dsk_e
- if errorlevel=2 goto dsk_d
- if errorlevel=1 goto dsk_c
-
- :dsk_c
- set cible=C:
- if exist %cible%\*.* goto crearep
- if exist %cible%\nul goto crearep
- echo Invalid Hard drive !
- goto fin
-
- :dsk_d
- set cible=D:
- if exist %cible%\*.* goto crearep
- if exist %cible%\nul goto crearep
- echo Invalid Hard drive !
- goto fin
-
- :dsk_e
- set cible=E:
- if exist %cible%\*.* goto crearep
- if exist %cible%\nul goto crearep
- echo Invalid Hard drive !
- goto fin
-
- :dsk_f
- set cible=F:
- if exist %cible%\*.* goto crearep
- if exist %cible%\nul goto crearep
- echo Invalid Hard drive !
- goto fin
-
- :dsk_g
- set cible=G:
- if exist %cible%\*.* goto crearep
- if exist %cible%\nul goto crearep
- echo Invalid Hard drive !
- goto fin
-
- :crearep
- if exist %cible%\lnx4win\*.* goto copie
- if exist %cible%\lnx4win\nul goto copie
- Echo Creating Linux4Win directory.
- %cible%
- cd\
- md lnx4win
-
- :copie
- echo.
- Echo Copying files into Linux4Win directory.
- copy %origine% %cible%\lnx4win >nul
- Echo Done copyinig files.
- Echo.
-
- :change
- Echo Changing Read-Write file permissions.
- attrib -r %cible%\lnx4win\*.*
- Echo Done changing file permissions.
- :verif2
- if exist %windir%\system\ctl3d32.dll goto backup
- goto copie2
-
- :backup
- Echo A backup copy of ctl3d32.dll is made into directory %cible%\lnw4win\backup.
- Echo This file already existed in the directory %windir%\system.
- %cible%
- cd\
- cd lnx4win
- md backup
- copy %windir%\system\ctl3d32.dll %cible%\lnx4win\backup >nul
- del %windir%\system\ctl3d32.dll
-
- :copie2
- Echo.
- Echo Copying ctl3d32.dll into directory %windir%\system.
- copy %cible%\lnx4win\ctl3d32.dll %windir%\system >nul
- Echo Done copying ctl3d32.dll.
- del %cible%\lnx4win\ctl3d32.dll
-
- %cible%
- \lnx4win\setup.bat
- :fin
-