home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / vrac / sb305.zip / SETUP.INF < prev    next >
Text File  |  1994-11-24  |  7KB  |  208 lines

  1. //
  2. // Setup Installation File
  3. // Created by Setup Builder Version Setup Builder
  4. //
  5. // Copyright 1993, 1994 G.Plowman
  6. //
  7. // Created: 14-10-1994 at 22:01:38
  8. //
  9. //
  10. // Setup procedure for installing/de-installing:
  11. //
  12. // SETUP / SETUP BUILDER
  13. //
  14.  
  15.  
  16. // Application Variables
  17. SET %Caption%="Setup"
  18. SET %Application%="Setup"
  19. SET %InstallPath%="C:\SETUP"
  20. SET %InstallDrive%="C:"
  21. SET %IniFile%="BUILDER.INI"
  22.  
  23.  
  24. // Welcome Dialog
  25. SET %Message1%="Welcome to the %Application% Installation Program."
  26. SET %Message2%="This program will install the %Application% software in the directory you specify or it will remove the software from your hard disk."
  27. DialogBox("Welcome")
  28. IF %ERROR% == IDCANCEL GOTO :EXIT
  29.  
  30.  
  31. // De-Installation option
  32. :BACK
  33. SET %PUSHB_1%="&Install"
  34. SET %Message1%="Install the %Application% software"
  35. SET %PUSHB_2%="&De-Install"
  36. SET %Message2%="De-Install the %Application% software"
  37. DialogBox("PUSHB2")
  38. IF %ERROR%==IDCANCEL GOTO :EXIT
  39. IF %ERROR%==IDBUTTON2 GOTO :DEINSTALL
  40.  
  41.  
  42. // Ask the user where to install the software
  43. :RETRY
  44. SET %Message1%="The install program will copy the %Application% files into the following directory:"
  45. DialogBox("AskPath")
  46. IF %ERROR% == IDBACK GOTO :BACK
  47. IF %ERROR% == IDCANCEL GOTO :EXIT
  48.  
  49.  
  50. // User defined code - pre file copying
  51. // Save the install directory
  52. WriteProfileString("Install", "Path", "%InstallPath%", "%IniFile%")
  53. WriteProfileString("Install", "Version", "3.05", "%IniFile%")
  54.  
  55.  
  56.  
  57.  
  58. // Make sure we still have Disk #01 in the drive
  59. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  60. IF %ERROR% == IDCANCEL GOTO :EXIT
  61.  
  62.  
  63. // Copy files from disk & show in gauge - no usage or overwrite check
  64. CopyFile(11)
  65. "SETUP.EXE", "%InstallPath%", "Copying: Interpreter Executable"
  66. "INST.EXE", "%InstallPath%", "Copying: Interpreter Executable"
  67. "BUILDER.EXE", "%InstallPath%", "Copying: Setup Builder Executable"
  68. "BUILDER.HLP", "%InstallPath%", "Copying: Setup Builder Help File"
  69. "SETUP.HLP", "%InstallPath%", "Copying: Setup Help File"
  70. "DOSEXEC.PIF", "%WindowsDirectory%", "Copying: PIF File"
  71. "INVOICE.TXT", "%InstallPath%", "Copying: Supporting Documentation"
  72. "COMMENTS.TXT", "%InstallPath%", "Copying: Supporting Documentation"
  73. "INSTALL.TXT", "%InstallPath%", "Copying: Supporting Documentation"
  74. "README.TXT", "%InstallPath%", "Copying: Supporting Documentation"
  75. "SETUP.SPJ", "%InstallPath%", "Copying: Sample Setup Project"
  76.  
  77.  
  78.  
  79.  
  80. // Now copy files which require a module usage
  81. // check or overwrite confirmation
  82. CheckExists("%SystemDirectory%CTL3DV2.DLL")
  83. IF %ERROR% == TRUE GOTO :PRESENT1
  84. GOTO :COPY1
  85. :PRESENT1
  86. GetFileDate("CTL3DV2.DLL",%SDate%)
  87. GetFileTime("CTL3DV2.DLL",%STime%)
  88. GetFileLength("CTL3DV2.DLL")
  89. SET %SLen%=%ERROR%
  90. GetFileDate("%SystemDirectory%CTL3DV2.DLL",%DDate%)
  91. GetFileTime("%SystemDirectory%CTL3DV2.DLL",%DTime%)
  92. GetFileLength("%SystemDirectory%CTL3DV2.DLL")
  93. SET %DLen%=%ERROR%
  94. MessageBox("Setup is attempting to overwrite:||%SystemDirectory%CTL3DV2.DLL|(%SDate% %STime% %SLen% Bytes)||with:||%CurrentDrive%\CTL3DV2.DLL|(%DDate% %DTime% %DLen% Bytes)||Are you sure you wish to overwrite this file ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
  95. IF %ERROR% == IDNO GOTO :NOCOPY1
  96. :COPY1
  97. CopyFile("CTL3DV2.DLL", "%SystemDirectory%")
  98. :NOCOPY1
  99.  
  100.  
  101.  
  102.  
  103. // User defined code - post file copying
  104. // Make the Program Manager Group and icons
  105. MakeGroup("%Application%", "")
  106. MakeIcon("Setup Builder", "%InstallPath%BUILDER.EXE")
  107. MakeIcon("Install", "A:\SETUP.EXE")
  108. MakeIcon("Setup Script Help", "WINHELP %InstallPath%SETUP.HLP")
  109. MakeIcon("ReadMe", "notepad %InstallPath%README.TXT")
  110. MakeIcon("Install Notes", "notepad %InstallPath%INSTALL.TXT")
  111.  
  112. // File association
  113. MessageBox("Setup can install a file association|for File Manager with .INF files.||Do you wish to install this association ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
  114. IF %ERROR% == IDNO GOTO :NOASSOC
  115. WritePrivateProfileString("Extensions", "inf", "%InstallPath%inst.exe ^.inf", "WIN.INI")
  116. :NOASSOC
  117.  
  118. // Tell Setup Builder where to find some files for creating install disks
  119. WritePrivateProfileString("Executables", "Setup", "%InstallPath%setup.exe", "BUILDER.INI")
  120. WritePrivateProfileString("Executables", "Inst", "%InstallPath%inst.exe", "BUILDER.INI")
  121.  
  122.  
  123. IF "%IniFile%" == "" SET %IniFile%="Setup.INI"
  124. SET %Message1% = "Please enter the following licensing information for the %Application% software:"
  125. DialogBox("License")
  126. IF %ERROR% == IDCANCEL GOTO :EXIT
  127.  
  128.  
  129. // Done
  130. SET %Message1%="|%Application% installation has been successfully completed."
  131. SET %Message2%=""
  132. DialogBox("OkBox")
  133.  
  134.  
  135. // User defined code - installation completion
  136. MessageBox("Do you wish to view the|extra installation notes ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
  137. IF %ERROR% == IDNO GOTO :NONOTES
  138.  
  139. ChDir("%InstallPath%")
  140. WinExec("notepad.exe %InstallPath%README.TXT")
  141. :NONOTES
  142.  
  143. GOTO :END
  144.  
  145.  
  146. // User decided to quit
  147. :EXIT
  148. SET %Message1%="Installation has been terminated. You should rerun this installation program at a later time to install %Application%."
  149. SET %Message2%="|The %Application% software has not been installed."
  150. DialogBox("OkBox")
  151. GOTO :END
  152.  
  153.  
  154. // Error
  155. :ERROR
  156. SET %Message1%="An error occured during installation of the %Application% software."
  157. SET %Message2%="|The %Application% software has not been fully installed."
  158. DialogBox("OkBox")
  159. GOTO :END
  160.  
  161.  
  162. // Not enough disk space
  163. :NOSPACE
  164. SET %Message1% = "|There is not enough space on the selected drive to install the %Application% software."
  165. SET %Message2% = ""
  166. DialogBox("OkBox")
  167. GOTO :RETRY
  168.  
  169.  
  170. // User defined code - De-Installation option
  171. :DEINSTALL
  172. // Check to see if the software has been installed correctly
  173. GetProfileString("Install", "Path", "", "BUILDER.INI", %InstallPath%)
  174.  
  175. IF "%InstallPath%" == "" GOTO :NOTINSTALLED
  176.  
  177. // Software has been installed
  178. MessageBox("The %Application% software is about to be removed from your machine.||All files, directories and the appropriate Program Manager Group will be deleted.||Are you sure you wish to continue ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
  179. IF %ERROR% == IDYES GOTO :DODELETE
  180. SET %Message1% = "De-installation aborted - the %Application% software has not been deinstalled."
  181. SET %Message2% = ""
  182. DialogBox("OKBOX")
  183. GOTO :END
  184.  
  185. :DODELETE
  186. Delete("%InstallPath%*.*")
  187. SET %Len% = Len("%InstallPath%") - 1
  188. SET %InstallPath% = Left("%InstallPath%", %Len%)
  189. RmDir("%InstallPath%")
  190. Delete("%WindowsDirectory%BUILDER.INI")
  191. Delete("%WindowsDirectory%COMPRESS.EXE")
  192. Delete("%WindowsDirectory%COMPRESS.TXT")
  193. DeleteGroup("%Application%")
  194.  
  195. SET %Message1% = "The %Application% software has been successfully de-installed."
  196. SET %Message2% = "To re-install the %Application% software you should re-run this installation program."
  197. DialogBox("OKBOX")
  198. GOTO :END
  199.  
  200. :NOTINSTALLED
  201. SET %Message1% = "The %Application% software has not been correctly installed."
  202. SET %Message2% = "The De-installation procedure is unable to de-install the %Application% software."
  203. DialogBox("OKBOX")
  204. GOTO :END
  205.  
  206.  
  207. :END
  208.