home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / busi / hb20d1.zip / INSHARD.BAT < prev    next >
DOS Batch File  |  1986-06-19  |  8KB  |  313 lines

  1. rem INSHARD.BAT June 19,86 (%1=drivelet:,%2=yes/no,%3=f/h,%4+%5=d:s)
  2. %1
  3. cd \
  4. cls
  5. echo 
  6.  
  7.  
  8.  
  9.         HomeBase HARD DISK Installation
  10. echo         -------------------------------
  11. echo     (HomeBase needs about 510 Kbytes of available disk space
  12. echo     for the \homebase directory and an additional 181 K if swap
  13. echo     is specified.  The current autoexec.bat  and  config.sys
  14. echo     should be on %1\, i.e. the root directory, if they are to
  15. echo     be modified for auto-bootup.  For additional (optional) 
  16. echo     syntax type:    a:install help.)
  17.  
  18. if %2/ == yes/ goto yes9
  19. a:ask Is your hard (or 720k+ floppy) disk drive letter %1
  20. if errorlevel 2 echo 
  21. RE-RUN this install with correct drive letter (e.g. install D:)
  22.  
  23. if errorlevel 2 a:insquit xxx
  24.  
  25. :yes9
  26. cls
  27. echo  
  28.  
  29.  
  30.         Checking disk free space
  31. echo               * Please Wait...
  32.  
  33.  
  34.  
  35. a:diskfree %1homebase
  36. if not errorlevel 3 goto nuf1
  37. echo 
  38. *ERROR* Disk %1 does not have enough empty space for HomeBase to fit.
  39. echo Please free up 510 Kilobytes of space and rerun this install program.
  40.  
  41. a:insquit xxx
  42.  
  43. :nuf1
  44. rem if not errorlevel 2 goto nuf2
  45. if errorlevel 2 echo You have very little memory left on your hard disk drive %1.
  46. if errorlevel 2 echo Watch for "INSUFFICIENT DISK SPACE" errors on the screen.
  47.  
  48. rem :nuf2
  49. if not errorlevel 1 echo 
  50.               * Please Wait...
  51.  
  52.  
  53. if not errorlevel 1 goto nuf3
  54. echo You already have a \HOMEBASE directory so this is probably
  55. echo an UPDATE to a new version. The old version of HomeBase
  56. echo will be erased and the new version put in its place.
  57.  
  58. echo Data files like NAMEADDR.NBD, etc.  will not be erased, but if
  59. echo you already have unconverted (Ver 1.04) .NBD or .NBR files
  60. echo you MUST convert them to the new format using HBNBFIX
  61. echo (supplied on Disk 1).
  62.  
  63. if %2/ == yes/ goto yes15
  64. a:ask Ok to erase the old version of HomeBase and proceed
  65. if errorlevel 2 a:insquit
  66.  
  67. cls
  68. echo 
  69.  
  70.  
  71.  
  72.  
  73.  
  74. Your config.sys file and autoexec file must NOT have references
  75. echo to HomeBase put there from a previous install of HomeBase
  76. echo e.g. "device=hbkernel.bin" or "hbkernel", etc.
  77.  
  78. cd \homebase
  79. if exist autoexec.old goto nuf2
  80. cd \
  81. a:ask Are your CONFIG.SYS and AUTOEXEC.BAT free of HomeBase references
  82. if not errorlevel 2 goto nuf3
  83.  
  84. cd \homebase
  85. if not exist %1autoexec.old a:insquit
  86.  
  87. :nuf2
  88. echo 
  89. HomeBase saved your original AUTOEXEC.BAT as AUTOEXEC.OLD.  With your
  90. echo permission the .OLD file will be used to form the new autoexec.bat.
  91. echo The current autoexec.bat will be renamed autoexec.hbo.
  92.  
  93. a:ask OK to use AUTOEXEC.OLD
  94. if errorlevel 2 a:insquit
  95. :yes15
  96. if exist %1autoexec.bat copy %1autoexec.bat %1\homebase\autoexec.hbo
  97. cd \homebase
  98. if exist %1autoexec.old copy %1autoexec.old %1\autoexec.bat
  99. cd \
  100.  
  101. :nuf3
  102. cls
  103. rem is this necess anymore???
  104. echo  
  105.  
  106.  
  107.  
  108.         Adding %1\HOMEBASE; to PATH if necessary
  109. echo                    * Please wait...
  110.  
  111.  
  112.  
  113. a:gpath > %1\n_w$path.t$p
  114. if not errorlevel 1 goto insthb1
  115. a:gpath %1\homebase; > %1\n_w$path.t$p
  116.  
  117. :insthb1
  118. if %2/ == yes/ goto yes19
  119. cls
  120. echo 
  121.  
  122.  
  123.  
  124. If this install procedure fails, you may not be able to boot
  125. echo up off of the hard disk until you restore the autoexec.bat file
  126. echo which is modified during installation.  For safety, you need
  127. echo a floppy Boot disk that will allow you to reboot.
  128.  
  129.  
  130. a:ask Do you have a floppy DOS Boot (System) disk
  131. if errorlevel 2 a:insquit
  132.  
  133. cls
  134. echo 
  135.  
  136.  
  137.  
  138.  
  139. Installation of HomeBase will change your AUTOEXEC.BAT file. For
  140. echo safety, the original autoexec.bat file is changed to AUTOEXEC.OLD.
  141. echo If this installation fails, you will have to restore this file to
  142. echo its original name by typing:
  143. echo            copy %1\autoexec.old \autoexec.bat
  144. echo This information is also in your HomeBase Installation document.
  145.  
  146.  
  147. a:ask Are you willing to take this risk of temporary failure
  148. if errorlevel 2 a:insquit
  149.  
  150. :yes19
  151. rem done this way since stupid dos accumulates handles
  152. echo %4 %5 > %1\hbconfig.hb$
  153. if %4/==/ del %1\hbconfig.hb$
  154. if %4/==./ del %1\hbconfig.hb$
  155. rem if swap specd (in %4 and %5) skip questions
  156. if not %4/==/ goto yes20
  157. rem yes here means use old hbconfig file -- no change
  158. if %2/ == yes/ goto yes21
  159.  
  160. echo  -s >%1\hbconfig.hb$
  161. cls
  162. echo 
  163.  
  164.  
  165.  
  166.  
  167. HomeBase Ver 2.0 supports "swapping" so that 134K of RAM (memory) is
  168. echo given up for use by your other programs (e.g. word processor, etc.).
  169. echo However, swapping takes time and will slow down your exits and
  170. echo entries into HomeBase.  (Once within HomeBase speed is not
  171. echo hampered.)  Hard disks take 3-5 seconds, RAM disks take 1 sec.
  172.  
  173. a:ask Do you want HomeBase to swap
  174. if errorlevel 2 goto yes20
  175. cls
  176. echo 
  177.  
  178.  
  179.  
  180.  
  181. Swapping utilizes a special "swap" file on your disk that needs
  182. echo 180 K of available (free) space.  It is best (fastest) to place
  183. echo the swap file on a RAM disk which uses the special "above" or
  184. echo "extended" memory. (Use the VDISK program supplied with DOS.)
  185.  
  186. echo If you have a RAM disk (or alternate disk) specify the drive
  187. echo letter like  E:  (You MUST type the ":").  If it is drive %1
  188. echo you may just press [Enter].
  189.  
  190.  
  191. a:ask ..Enter the swap file disk drive letter (like E:) >%1\hbconfig.hb$
  192. echo  s >>%1\hbconfig.hb$
  193.  
  194. :yes20
  195. if %2/ == yes/ goto yes21
  196. cls
  197. echo 
  198.  
  199.  
  200.  
  201.  
  202.                  -- ANSWER CAREFULLY --
  203.  
  204. echo A "yes" answer here will start installation of HomeBase.
  205.  
  206. a:ask Ok to install HOMEBASE
  207. if errorlevel 2 a:insquit
  208.  
  209. :yes21
  210. %1
  211. cd \
  212. a:diskfree %1homebase create  ;creates and sets \homebase if enuf space avail 
  213. cls
  214. echo 
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.         * * * Installing HomeBase * * *  (please wait)
  222.  
  223.  
  224. cd \homebase
  225. if exist hbconfig.hb$ copy hbconfig.hb$ hbconfig.hbb
  226. if %4/==./ goto ihb35
  227. if exist hbconfig.hb$ del hbconfig.hb$
  228. :ihb35
  229. if exist autoexec.hbo copy autoexec.hbo \autoexec.hbo
  230. if exist autoexec.old del autoexec.old
  231. cd \
  232. if exist autoexec.bat copy autoexec.bat \homebase\autoexec.old
  233. echo files=20 >con$fig.$h$
  234. if exist config.sys copy config.sys con$fig.$h$
  235. a:files20 < con$fig.$h$ >config.sys
  236. del con$fig.$h$
  237. if exist hbconfig.hb$ copy hbconfig.hb$ \homebase\hbconfig.hb$
  238. if exist hbconfig.hb$ del hbconfig.hb$
  239. cd \homebase
  240. if exist autoexec.old copy autoexec.old \autoexec.old
  241.  
  242. if exist hbkernel.bin del hbkernel.bin
  243. if exist hbasync.bin del hbasync.bin
  244. if exist hbvsi.exe del hbvsi.exe
  245. copy \n_w$path.t$p+a:\autohard.bat h$$h$$ba.ba$ >nul
  246. echo %1 > homebase.bat
  247. a:ifasync < h$$h$$ba.ba$ >> homebase.bat
  248. copy autoexec.old+homebase.bat \autoexec.bat >nul
  249. copy homebase.bat \homebase.bat >nul
  250. copy a:\insdone.bat+\n_w$path.t$p insdone.bat >nul
  251. del h$$h$$ba.ba$
  252. del \n_w$path.t$p
  253. copy a:hb*.*
  254.  
  255. cls
  256.  
  257. :insthb3
  258. echo   
  259.  
  260. 
  261.  
  262.  
  263.  
  264.  
  265.         Please place HomeBase DISK 2 in drive A:
  266.  
  267.  
  268. pause
  269.  
  270. if not exist a:disk2.doc echo 
  271. ERROR * WRONG DISK but do not change it yet -- Wait...
  272.  
  273. if not exist a:disk2.doc goto insthb3
  274.  
  275. copy a:hb*.*
  276. copy a:swap.com
  277.  
  278. if %2/ == yes/ goto yes30
  279. if exist *.nb* cls
  280. if exist *.nb* echo 
  281.  
  282. REMEMBER to run HBNBFIX to convert any Ver. 1.04 NBD and NBR files
  283.  
  284. if exist *.nb* pause
  285.  
  286. :yes30
  287. if not exist nameaddr.nbd copy a:nameaddr.nbd
  288. if not exist messages.nbd copy a:messages.nbd
  289. if not exist areacode.nbd copy a:areacode.nbd
  290. if not exist labels.nbr   copy a:labels.nbr
  291. if not exist roladex.nbr  copy a:roladex.nbr
  292. if not exist nameaddr.nbr copy a:nameaddr.nbr
  293. if not exist proginfo.nbd copy a:proginfo.nbd 
  294. cls
  295. echo 
  296.  
  297.  
  298.  
  299. Installation of HomeBase has:
  300.  
  301. echo 1) Put "files=20" into a CONFIG.SYS file.
  302.  
  303. echo 2) Created or modified the AUTOEXEC.BAT file (if any).
  304. echo    Several lines relating to HomeBase have been placed at
  305. echo    the very end.  However, if your original AUTOEXEC.BAT called
  306. echo    another BAT file to complete the boot-up process, you must fix
  307. echo    this by placing the call to the other BAT file at the end,
  308. echo    after the HomeBase lines.  PLEASE! Do this before re-booting.
  309.  
  310. if not %2/ == yes/ pause
  311. insdone ddd %1
  312.  
  313.