home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sysmgmt / setup / infinst / product.inf < prev    next >
INI File  |  1996-06-22  |  9KB  |  300 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;
  3. ;  Version identifies stlye (WIN4) and class
  4. ;  Class is usually used to get all infs for a
  5. ;  product or driver type if an exe it giving
  6. ;  users a list of things to install, for example 
  7. ;  all video drivers infs in the windows\inf directory
  8. ;
  9. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  10.  
  11. [version]
  12. signature="$CHICAGO$"
  13.  
  14. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  15. ;
  16. ;  Install sections, these are the options
  17. ;  for building the installation file lists
  18. ;
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20.  
  21. [DefaultInstall]
  22. ; we are leave this blank so that a right mouse click
  23. ; install does do anything
  24. ; we are chosing to do this because we want our install to
  25. ; give the user a choice of where to install to
  26. ; For drivers or other installations where the files must go
  27. ; to a predetermined location (like windows\system) this section
  28. ; can be used
  29.  
  30. [ProductInstall]
  31. CopyFiles=Product.copy.files
  32. AddReg=Product.Add.Reg
  33. UpdateInis=Product.links
  34. ;,del.links.old
  35.  
  36. [ProductInstall.Alpha]
  37. CopyFiles=Product.copy.files
  38. AddReg=Product.Add.Reg
  39. UpdateInis=Product.links,del.links.old
  40.  
  41. [ProductInstall.Mips]
  42. CopyFiles=Product.copy.files
  43. AddReg=Product.Add.Reg
  44. UpdateInis=Product.links,del.links.old
  45.  
  46. [ProductInstall.PPC]
  47. CopyFiles=Product.copy.files
  48. AddReg=Product.Add.Reg
  49. UpdateInis=Product.links,del.links.old
  50.  
  51. [Option2Section]
  52. CopyFiles=Product.copy.files2
  53.  
  54. [Option3Section]
  55. CopyFiles=Product.copy.files3
  56.  
  57. [Option4Section]
  58. CopyFiles=Product.copy.files4
  59.  
  60. ;;;;;;;;;;
  61. ; Uninstall
  62.  
  63. [DefaultUninstall]
  64. ; be sure to remove everything
  65. DelFiles=Product.del.files,
  66. DelFiles=Product.del.files2,Product.del.files3,Product.del.files4
  67. DelReg=Product.Del.Reg
  68. UpdateInis=del.links
  69.  
  70. [MyProgramUninstall]
  71. ; be sure to remove everything
  72. DelFiles=Product.copy.files
  73. DelFiles=Product.copy.files2,Product.copy.files3,Product.copy.files4
  74. DelReg=Product.Del.Reg
  75. UpdateInis=del.links
  76.  
  77. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  78. ;
  79. ;  Registry sections, used by different install
  80. ;  sections above
  81. ;
  82. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  83.  
  84. [Product.Add.Reg]
  85. ;
  86. ; Product Registry entries here
  87. ; For compatibility you must specify 0,1,2,3 for the fourth
  88. ; parameter if you want to specify a value
  89. ;
  90. HKLM,SOFTWARE\MyCompany\MyProduct,"Version",0,"1.0"
  91. HKLM,SOFTWARE\MyCompany\MyProduct\Test1,"Allow International Export",0,"Yes"
  92. HKLM,SOFTWARE\MyCompany\MyProduct\Test1,"MyProduct Data Value",0,"Data 1"
  93. HKLM,SOFTWARE\MyCompany\MyProduct\Test1,"MyProduct A Number",1,0x1
  94. HKLM,SOFTWARE\MyCompany\MyProduct\Test1,"MyProduct Number2",1,0xC2
  95. HKLM,SOFTWARE\MyCompany\MyProduct\Test1\"MyProduct Extra Key",ValueD1,0,"Test Data"
  96. ;
  97. ; Register shared components, note these are bogus names in this sample
  98. ;
  99. HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs,%11%\myprodsys.dll,1,01,00,00,00
  100. HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs,%65600%\myproduct.dll,1,01,00,00,00
  101. ;
  102. ; for add/remove programs applet
  103. ;
  104. HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyProduct,"DisplayName",0,"MyProduct Version 1.0"
  105. HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyProduct,"UninstallString",0,"Rundll32.exe setupapi.dll,InstallHinfSection DefaultUninstall 132 "%65600%"\product.inf"
  106.  
  107. ;;;;;;;;;
  108. ;
  109. ; registry delete works by pruning the tree,
  110. ; so if you have interdependent values, put thems in subkeys and
  111. ; not in values of the main key since when you prune all the values are lost
  112. ;
  113.  
  114. [Product.Del.Reg]
  115. ;
  116. ;Registry entries here
  117. ;
  118.  
  119. HKLM,SOFTWARE\MyCompany\MyProduct,"Version",,
  120. HKLM,SOFTWARE\MyCompany\MyProduct\Test1,,,
  121. HKLM,SOFTWARE\MyCompany\MyProduct\Test1,,,
  122. HKLM,SOFTWARE\MyCompany\MyProduct\Test1,,,
  123. HKLM,SOFTWARE\MyCompany\MyProduct\Test1,,,
  124. HKLM,SOFTWARE\MyCompany\MyProduct\Test1\"MyProduct Extra Key",,
  125. HKCU,SOFTWARE\MyCompany\MyProduct,,,
  126.  
  127. ;
  128. ; for add/remove programs applet
  129. ;
  130.  
  131. HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyProduct,"DisplayName",,
  132. HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyProduct,"UninstallString",,
  133. HKCU,SoftWare\Microsoft\Windows\CurrentVersion\Uninstall\MyProduct,,,
  134.  
  135. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  136. ;
  137. ; Disk lay out information, used by the CopyFiles lists
  138. ;
  139. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  140. ;
  141. ; This is the source disk identifiers the number at the
  142. ; beginning maps to the SourceDisksFiles first parameter
  143.  
  144. [SourceDisksNames]
  145. 1="The Product Source Disk Name, 1.0","",1
  146. 2="The Product Optional Component Disk, 1.0","",1
  147.  
  148. ;;;;;;;;;;;;;;;;;;
  149. ;
  150. ; SourceDisksFiles -
  151. ; this must have ALL file names in any copyfiles section
  152. ; so that the default copyfile error callback dialog (browse,skip)
  153. ; can use the SourceDisksNames strings above to help find the file
  154. ; -- this infomation can also be put in a layout.inf
  155. ;
  156. ; filename_on_source = diskid,subdir,size,checksum,spare,spare
  157.  
  158. [SourceDisksFiles]
  159. license.txt = 1,,,,,
  160. product.dll = 1,,,,,
  161. product.inf = 1,,,,,
  162. readme.txt = 1,,,,,
  163. error.txt = 1,,,,,
  164. opt2.txt = 2,,,,,
  165. opt3.txt = 2,,,,,
  166. opt4.txt = 2,,,,,
  167.  
  168. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  169. ;
  170. ; Targetdirectories predefined for [DestinationDirs] section
  171. ;   parameter number one  
  172. ;     00 = null, use only the second parameter for a path
  173. ;     11 = windows system directory
  174. ;     ...
  175. ;
  176.  
  177. [DestinationDirs]
  178. ;
  179. ; a default if a particular copyfiles section
  180. ;
  181. ; DefaultDestDir=LDID[,subdir]  ; not used in this sample
  182.  
  183. Product.del.files=01      ; 01 is the source directory
  184. Product.del.files2=01 
  185. Product.del.files3=01 
  186. Product.del.files4=01 
  187.  
  188. ;
  189. ; Run time defined strings, these are set with 
  190. ; SetupSetDirectoryId once this inf is openned
  191. ;
  192.  
  193. Product.copy.files=65600   ; 65600 is a random choice for a dirid
  194. Product.copy.files2=65600  ; note this must be set by a calling
  195. Product.copy.files3=65600  ; application and must be > 65536
  196. Product.copy.files4=65600
  197.  
  198. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  199. ;
  200. ; These are the CopyFiles lists, here is where the files
  201. ; for each component are defined
  202. ; Note the last param (parm 4) is the CopyFlag for that
  203. ; File, for example 8 means copy on  restart--see the doc for more
  204. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  205. [Product.copy.files]
  206. license.txt
  207. product.dll,,,
  208. product.inf
  209. readme.txt
  210. error.txt
  211.  
  212. [Product.del.files]
  213. license.txt
  214. product.dll,,,
  215. product.inf
  216. readme.txt
  217. error.txt
  218.  
  219. [Product.copy.files2]
  220. opt2.txt
  221. [Product.del.files2]
  222. opt2.txt
  223.  
  224. [Product.copy.files3]
  225. opt3.txt
  226. [Product.del.files3]
  227. opt3.txt
  228.  
  229. [Product.copy.files4]
  230. opt4.txt
  231. [Product.del.files4]
  232. opt4.txt
  233.  
  234. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  235. ;
  236. ; INI sections, used to create and delete icons 
  237. ;  other uses are possible
  238. ;
  239. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  240. [Product.links]
  241. ;create folders
  242. setup.ini, progman.groups,,"ProductGroup=The Product Group"     
  243. ; create links
  244. ; second param must match above and the linked to file must really exist
  245. setup.ini, ProductGroup,,"%PRODUCT_DESC%,%65600%\Product.dll,,,"
  246. setup.ini, ProductGroup,,"%README_DESC%,%65600%\readme.txt,,," 
  247. ;Add desktop icons here
  248.  
  249. [del.links]
  250. ;remove folders
  251. setup.ini, progman.groups,,"ProductGroup=The Product Group"     
  252. ; remove links
  253. ; second param must match above and last param is EXACT description name
  254. setup.ini, ProductGroup,,"%PRODUCT_DESC%" 
  255. setup.ini, ProductGroup,,"%README_DESC%" 
  256. ;remove desktop icons here
  257.  
  258. [del.links.old]
  259. setup.ini, progman.groups,,"MyProductFolderOld=%DESC_OLD%"
  260. setup.ini, MyProductFolderOld,, """%README_DESC%"""
  261.  
  262. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  263. ;
  264. ; Strings replace variable in percents above
  265. ;
  266. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  267. [Strings]
  268. PRODUCT_DESC    = "Product Name"
  269. DT_MESSAGES     = "The Product"
  270. DT_DESKTOP      = "Desktop"
  271. DESC_OLD   = "Old Product"    ; removes old links
  272. README_DESC       = "Read Me (Product)"
  273.  
  274.  
  275. ;
  276. ; Optional Components are not demonstrated in this samples
  277. ;
  278. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  279. ;
  280. ;  Optional Install sections, these are the options
  281. ;  for building the installation file lists for optional
  282. ;  components.  This is used for example with "Have Disk"
  283. ;  on the windows setup add/remove programs applet
  284. ;
  285. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  286. ;[Option Components]
  287. ;OptionalInstall
  288. ;
  289. ;[OptionalInstall]
  290. ;CopyFiles=Product.optional.copy.files
  291. ;OptionDesc="Optional Product components"
  292. ;Tip="Install these optionally"
  293. ;InstallDefault=0 ; 1 if this section should be installed by default
  294. ;IconIndex=11      ; Icon to display, see doc for choices, 11 is the default
  295. ;;Parent=install-section
  296. ;Needs=DefaultInstallation ; dependency the user is warned about
  297. ;Include=additional.inf    ; inf automatically included
  298.  
  299.