home *** CD-ROM | disk | FTP | other *** search
/ PCMania 9 / Pcmania_Ep2_09_CD-Linux_Mandrake.iso / lnx4win / install.bat < prev    next >
Encoding:
DOS Batch File  |  2000-01-05  |  3.1 KB  |  146 lines

  1. cls
  2. @echo off
  3. echo.
  4. echo Installation of Lnx4Win
  5. echo This program will install all necessary files for Linux4win on your harddisk.
  6. echo.
  7. echo.
  8. echo Press any key to continue.
  9. echo Press CTRL-C to stop this program.
  10. echo.
  11. pause>nul
  12.  
  13. choice /c:defgh /N Please chose the drive letter of your CD-Rom :
  14. if errorlevel=5 goto cdr_h
  15. if errorlevel=4 goto cdr_g
  16. if errorlevel=3 goto cdr_f
  17. if errorlevel=2 goto cdr_e
  18. if errorlevel=1 goto cdr_d
  19.  
  20. :cdr_d
  21. set origine=D:\lnx4win\*.*
  22. if exist "D:\*.*" goto verif
  23. if exist "D:\"nul goto verif
  24. echo Invalid CD-Rom drive !
  25. goto fin
  26.  
  27. :cdr_e
  28. set origine=E:\lnx4win\*.*
  29. if exist "E:\*.*" goto verif
  30. if exist "E:\"nul goto verif
  31. echo Invalid CD-Rom drive !
  32. goto fin
  33.  
  34. :cdr_f
  35. set origine=F:\lnx4win\*.*
  36. if exist "F:\*.*" goto verif
  37. if exist "F:\"nul goto verif
  38. echo Invalid CD-Rom drive !
  39. goto fin
  40.  
  41. :cdr_g
  42. set origine=G:\lnx4win\*.*
  43. if exist "G:\*.*" goto verif
  44. if exist "G:\"nul goto verif
  45. echo Invalid CD-Rom drive !
  46. goto fin
  47.  
  48. :cdr_h
  49. set origine=H:\lnx4win\*.*
  50. if exist "H:\*.*" goto verif
  51. if exist "H:\"nul goto verif
  52. echo Invalid CD-Rom drive !
  53. goto fin
  54.  
  55. :verif
  56. if exist %origine% goto destination
  57. echo Please insert the right CD-Rom !
  58. goto fin
  59.  
  60. :destination
  61. choice /c:cdefg /N Please choose the partition letter where Linux4Win will be installed :
  62. if errorlevel=5 goto dsk_g
  63. if errorlevel=4 goto dsk_f
  64. if errorlevel=3 goto dsk_e
  65. if errorlevel=2 goto dsk_d
  66. if errorlevel=1 goto dsk_c
  67.  
  68. :dsk_c
  69. set cible=C:
  70. if exist %cible%\*.* goto crearep
  71. if exist %cible%\nul goto crearep
  72. echo Invalid Hard drive !
  73. goto fin
  74.  
  75. :dsk_d
  76. set cible=D:
  77. if exist %cible%\*.* goto crearep
  78. if exist %cible%\nul goto crearep
  79. echo Invalid Hard drive !
  80. goto fin
  81.  
  82. :dsk_e
  83. set cible=E:
  84. if exist %cible%\*.* goto crearep
  85. if exist %cible%\nul goto crearep
  86. echo Invalid Hard drive !
  87. goto fin
  88.  
  89. :dsk_f
  90. set cible=F:
  91. if exist %cible%\*.* goto crearep
  92. if exist %cible%\nul goto crearep
  93. echo Invalid Hard drive !
  94. goto fin
  95.  
  96. :dsk_g
  97. set cible=G:
  98. if exist %cible%\*.* goto crearep
  99. if exist %cible%\nul goto crearep
  100. echo Invalid Hard drive !
  101. goto fin
  102.  
  103. :crearep
  104. if exist %cible%\lnx4win\*.* goto copie
  105. if exist %cible%\lnx4win\nul goto copie
  106. Echo Creating Linux4Win directory.
  107. %cible%
  108. cd\
  109. md lnx4win
  110.  
  111. :copie
  112. echo.
  113. Echo Copying files into Linux4Win directory.
  114. copy %origine% %cible%\lnx4win >nul
  115. Echo Done copyinig files.
  116. Echo.
  117.  
  118. :change
  119. Echo Changing Read-Write file permissions.
  120. attrib -r %cible%\lnx4win\*.*
  121. Echo Done changing file permissions.
  122. :verif2
  123. if exist %windir%\system\ctl3d32.dll goto backup
  124. goto copie2
  125.  
  126. :backup
  127. Echo A backup copy of ctl3d32.dll is made into directory %cible%\lnw4win\backup.
  128. Echo This file already existed in the directory %windir%\system.
  129. %cible%
  130. cd\
  131. cd lnx4win
  132. md backup
  133. copy %windir%\system\ctl3d32.dll %cible%\lnx4win\backup >nul
  134. del %windir%\system\ctl3d32.dll
  135.  
  136. :copie2
  137. Echo.
  138. Echo Copying ctl3d32.dll into directory %windir%\system.
  139. copy %cible%\lnx4win\ctl3d32.dll %windir%\system >nul
  140. Echo Done copying ctl3d32.dll.
  141. del %cible%\lnx4win\ctl3d32.dll
  142.  
  143. %cible%
  144. \lnx4win\setup.bat
  145. :fin
  146.