home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 March / CHIPCD_3_98.iso / software / testsoft / exchange / connect / msmcon / bin / ecsdlc.inf < prev    next >
INI File  |  1997-08-25  |  68KB  |  2,372 lines

  1. ;************************************************************************
  2. ;************************************************************************
  3. ;
  4. ; ECSDLC.INF
  5. ;
  6. ;       Eicon SDLC Link Support and Device Driver INF file
  7. ;
  8. ; History:
  9. ;
  10. ; Notes:
  11. ;   1) This file is based on the template.inf file that is distributed
  12. ;      to IHV/ISV's.
  13. ;
  14. ;************************************************************************
  15. ;************************************************************************
  16.  
  17. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  18. ;
  19. ; INITIALIZATION SECTION
  20. ; ----------------------
  21. ; This section is responsible for defining the product variables.  It is the
  22. ; highest level of definition.  Installation programs will use this section
  23. ; to figure out available options etc.
  24. ;
  25. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  26.  
  27. ;========================================================================
  28. ;
  29. ; SOURCE MEDIA DESCRIPTIONS
  30. ; -------------------------
  31. ; The IHV should list all the diskette labels here.  The source media
  32. ; description is used during copy to prompt the user for a diskette
  33. ; if the source is diskettes.  The TAGFILE field is used to confirm that
  34. ; the proper disk is being used.
  35. ;
  36. ; FORMAT:
  37. ; The format includes an enumeration constant and a name for the disk, as well
  38. ; as a number of possible flags (including the TAGFILE flag.)
  39. ;       1 = "Diskette 1 Label", TAGFILE = "Disk1.Tag"
  40. ;       2 = "Diskette 2 Label", TAGFILE = "Disk2.Tag"
  41. ;       ...
  42. ;
  43. ; REFERENCES:
  44. ; TODO - Add a reference to somewhere
  45. ;
  46. ;========================================================================
  47.  
  48. [Source Media Descriptions]
  49. 1 = "SNA Link Support diskette"
  50.  
  51. ;========================================================================
  52. ;
  53. ; OPTION TYPE
  54. ; -----------
  55. ; This identifies the Option type we are dealing with.  The different
  56. ; possible types are:
  57. ;
  58. ; COMPUTER, DISPLAY, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  59. ;
  60. ;   Types specific to networking:
  61. ;     NetAdapter,       A netcard/adapter combination or just a netcard
  62. ;     NetDriver,        A netcard driver
  63. ;     NetTransport,     A complete NDIS-compliant TDI transport stack
  64. ;     NetService,       An NT networking service
  65. ;     NetWork,          A complete network ensemble
  66. ;     NetProvider,      A complete network which supports NT MPR protocol
  67. ;
  68. ; TODO - do we want to mention all those types or just the ones relevant to us?
  69. ; REFERENCES:
  70. ; TODO - Add a reference to somewhere
  71. ;========================================================================
  72.  
  73. [Identification]
  74.     OptionType = NetService
  75.  
  76. ;========================================================================
  77. ;
  78. ; LANGUAGES SUPPORTED
  79. ; -------------------
  80. ; The languages supported by the IHV INF, For every language supported
  81. ; we need to have a separate text section for every displayable text
  82. ; section.
  83. ;
  84. ; REFERENCES:
  85. ; TODO - Add a reference to somewhere
  86. ;
  87. ;========================================================================
  88.  
  89. [LanguagesSupported]
  90.     ENG
  91.  
  92. ;========================================================================
  93. ;
  94. ; OPTION LIST
  95. ; -----------
  96. ; This section lists the IHV Option key names.  These keys are locale
  97. ; independent and used to represent the option in a locale independent
  98. ; manner.
  99. ;
  100. ; REFERENCES:
  101. ; TODO - Add a reference to somewhere
  102. ;
  103. ;========================================================================
  104.  
  105. [Options]
  106.     ECSDLCLS
  107. ;       ECSDLCDD
  108.     
  109. ;========================================================================
  110. ;
  111. ; OPTION TEXT SECTION
  112. ; -------------------
  113. ; These are text strings used to identify the option to the user.  There
  114. ; are separate sections for each language supported.  
  115. ;
  116. ; FORMAT:
  117. ; The format of the section name is "OptionsText" concatenated with the 
  118. ; Language represented by the section.
  119. ;       [OptionsTextLNG1]
  120. ;               ...
  121. ;       [OptionsTextLNG2]
  122. ;               ...
  123. ;
  124. ; REFERENCES:
  125. ; TODO - Add a reference to somewhere
  126. ;
  127. ;========================================================================
  128.  
  129. [OptionsTextENG]
  130.     ECSDLCLS        = "SNA Eicon SDLC Link Service"
  131. ;       ECSDLCDD        = "SNA Eicon SDLC/X.25 Device Driver"
  132.  
  133. ;========================================================================
  134. ;
  135. ; SNA OPTION LIST
  136. ; ---------------
  137. ; This is the list of options available to the SNA Server user.  This is 
  138. ; the list presented to the user from the SNA Server setup as the 
  139. ; available options.  Like the normal options list, it is locale independent.
  140. ; REFERENCES:
  141. ; TODO - Add a reference to somewhere
  142. ;
  143. ;========================================================================
  144.  
  145. [SNAOptions]
  146.     ECSDLCLS
  147.  
  148. ;========================================================================
  149. ;
  150. ; SNA OPTION ADDITIONALS
  151. ; ----------------------
  152. ; This section specifies the additional installations that should be performed
  153. ; for each of the main options.  The SNA Server setup will invoke this INF
  154. ; file with each of these additional options in order followed by the main
  155. ; option.
  156. ; FORMAT:
  157. ; The format for the section name is "SNAOptionAdds" concatenated with the
  158. ; option name.
  159. ;       [SNAOptionAddsSNAOPT1]
  160. ;               ...
  161. ;       [SNAOptionAddsSNAOPT2]
  162. ;               ...
  163. ;
  164. ; REFERENCES:
  165. ; TODO - Add a reference to somewhere
  166. ;
  167. ;========================================================================
  168.  
  169. [SNAOptionAddsECSDLCLS]
  170. ;       ECSDLCDD
  171.  
  172. ;========================================================================
  173. ;
  174. ; INSTALLATION STEPS SECTION
  175. ; --------------------------
  176. ; In this section, the IHV gets to define which steps will be taken in the
  177. ; installation procedure.  There are three variables and they all must be 
  178. ; defined.
  179. ; FORMAT:
  180. ; The format is "InstallSteps" concatenated with the option name
  181. ;       [InstallStepsOPT1]
  182. ;               ...
  183. ;
  184. ;========================================================================
  185.  
  186. [InstallStepsECSDLCLS]
  187.     AddFilesToCopyList      = YES
  188.     CopyFilesInCopyList     = YES
  189.  
  190. ;[InstallStepsECSDLCDD]
  191. ;       AddFilesToCopyList      = YES
  192. ;       CopyFilesInCopyList     = NO
  193.  
  194. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  195. ; DIALOG CONSTANTS SECTION
  196. ; ------------------------
  197. ; This section is responsible for defining dialog constants.  It is 
  198. ; meant to be used to simplify programming this INF file as well as reading
  199. ; it.
  200. ;
  201. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  202.  
  203. [DialogConstants]
  204.     Radio1  = "1"
  205.     Radio2  = "2"
  206.     Radio3  = "3"
  207.     Radio4  = "4"
  208.     Radio5  = "5"
  209.  
  210. ;++++++++++++++++++++++++++++++++++++                                           
  211. ;                                                                               
  212. ; ProgressCopyVars:                                                             
  213. ; These variables specify the look of the gauge that comes up                   
  214. ; when copying files.                                                           
  215. ;                                                                               
  216. ;++++++++++++++++++++++++++++++++++++                                           
  217. [ProgressCopyVars]                                                              
  218. ProCaption      = "File copy in progress"                                       
  219. ProCancel       = "&Cancel"                                                     
  220. ProCancelMsg    = $(ProductTitle)$(!LF)"is not fully installed."$(!LF)+         
  221.           "Are you sure you want to cancel before all"$(!LF)+           
  222.                     "the files are copied?"                                       
  223. ProCancelCap    = $(SetupTitle)" Warning"                                       
  224. ProText1        = "Copying "                                                    
  225. ProText2        = "        to"                                                  
  226.  
  227. [HelpContextIDs]
  228.     IDD_SDLCSETUP = 101
  229.  
  230. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  231. ;
  232. ; FILE CONSTANTS SECTION
  233. ; ----------------------
  234. ; This section is responsible for defining some general product information
  235. ; that will be used mostly for the registry
  236. ;
  237. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  238.  
  239. ;++++++++++++++++++++++++++++++++++++
  240. ;
  241. ; File Names Subsection:
  242. ; This subsection contains useful filenames for use as macros.
  243. ;
  244. ;++++++++++++++++++++++++++++++++++++
  245.  
  246. [FileConstants]
  247.  
  248. UtilityInf      = $(!SNARootDir)"\SETUPUTL.INF"
  249. SubroutineInf   = $(!STF_WINDOWSSYSPATH)"\SUBROUTN.INF"
  250. DialogLibrary   = $(!SNARootDir)"\SETUP.SRL"
  251. ThisFile        = "ECSDLC"
  252. ThisInf         = $(ThisFile)".INF"
  253. ThisSrl         = $(ThisFile)".SRL"
  254. ThisHlp         = $(ThisFile)".HLP"
  255. HlpMin          = "80"
  256. HlpMax          = "80"
  257. $ShellCode      = 0
  258.  
  259. ;++++++++++++++++++++++++++++++++++++
  260. ;
  261. ; Product Information Subsection:
  262. ; This subsection contains lots of product information that will be used 
  263. ; mostly in the registry.
  264. ;
  265. ; For the SNAServiceType value, please refer to the "SNAServiceTypes" section
  266. ; in the SETUPUTL.INF file.  Also, only Link Supports have this value, all
  267. ; others should have a NULL string ("") for this value.
  268. ;
  269. ;++++++++++++++++++++++++++++++++++++
  270.  
  271. [FileConstantsECSDLCLS]
  272. ;
  273. ; Product Info
  274. ;
  275. ProductVersion                  = "1.0"
  276. ProductName                     = "ECSDLCLS"
  277. ProductFullName                 = $(ProductName)"_"$(ProductVersion)"_"$(Instance)
  278. ProductRegBase                  = $(!NTN_SoftwareBase)"\Eicon"
  279. ProductType                     = "Link"
  280. ProductImagePath                = "SNALINK.EXE"
  281. ProductDepends                  = {}
  282. ProductParams                   = {}
  283. ProductExtraParams              = {}
  284. ProductExclusive                = $(FALSE)
  285. ProductDLL                      = "ECSDLC.DLL"
  286. ProductServicePrefix            = "SnaSdlc"
  287. ProductServiceQuery             = $(TRUE)
  288. ;
  289. ; Registry Key Information
  290. ;
  291. SNAServiceType                  = "CESLINK"
  292. ;
  293. ; NetRules Stuff
  294. ;
  295. NetRulesClass                   = "snasdlclink snalink"
  296. NetRulesTitle                   = "SNA SDLC Link Service"
  297. NetRulesUse                     = "service yes yes"
  298. NetRulesBindable                = "snasdlclink snasyncdriver non non 100"
  299. NetRulesType                    = "snasdlc snasdlclink"
  300. FullInfName                     = $(!SNARootDir)"\system\hwsetup\"$(ThisInf)
  301. SoftwareType                    = "service"
  302.  
  303. ;[FileConstantsECSDLCDD]
  304. ;
  305. ; Product Info
  306. ;
  307. ;ProductVersion                 = "1.0"
  308. ;ProductName                    = "ECSYNCDD"
  309. ;ProductFullName                        = $(ProductName)"_"$(ProductVersion)"_"$(Instance)
  310. ;ProductRegBase                 = $(!NTN_SoftwareBase)"\Microsoft"
  311. ;ProductType                    = "Driver"
  312. ;ProductImagePath               = "ECSYNC.SYS"
  313. ;ProductDepends                 = {}
  314. ;ProductParams                  = {}
  315. ;ProductExtraParams             = {}
  316. ;ProductExclusive               = $(TRUE)
  317. ;ProductDLL                     = ""
  318. ;ProductServicePrefix           = "ECSYNC"
  319. ;ProductServiceQuery            = $(FALSE)
  320. ;
  321. ; Registry Key Information
  322. ;
  323. ;SNAServiceType                 = "DRIVER"
  324. ;
  325. ; NetRules Stuff
  326. ;
  327. ;NetRulesClass                  = "snasyncdriver basic yes"
  328. ;NetRulesTitle                  = "Eicon SDLC/X.25 Device Driver"
  329. ;NetRulesUse                    = "driver yes yes"
  330. ;NetRulesBindable               = ""
  331. ;NetRulesType                   = "snasyncdd snasyncdriver"
  332. ;FullInfName                    = $(!SNARootDir)"\system\hwsetup\"$(ThisInf)
  333. ;SoftwareType                   = "driver"
  334.  
  335. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  336. ;
  337. ; GENERAL CONSTANTS SECTION
  338. ; -------------------------
  339. ; This section is responsible for defining some general constants that
  340. ; are used in this INF script.  These constants include flow control 
  341. ; variables, exit codes, and registry reference numbers.
  342. ;
  343. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  344.  
  345. [GeneralConstants]
  346.  
  347. ;++++++++++++++++++++++++++++++++++++
  348. ;
  349. ; Flow Control Variables:
  350. ; From will generally represents the label we just came from while To 
  351. ; represents the label we are headed to.
  352. ;
  353. ;++++++++++++++++++++++++++++++++++++
  354.  
  355. from    = ""
  356. to      = ""
  357.  
  358. ;++++++++++++++++++++++++++++++++++++
  359. ;
  360. ; Booleans:
  361. ;
  362. ;++++++++++++++++++++++++++++++++++++
  363.  
  364. TRUE    = 1
  365. FALSE   = 0
  366.  
  367. ;++++++++++++++++++++++++++++++++++++
  368. ;
  369. ; Other values
  370. ;
  371. ;++++++++++++++++++++++++++++++++++++
  372. NOTIFY = 2
  373.  
  374. ;++++++++++++++++++++++++++++++++++++
  375. ;
  376. ; Registry Initialization Parameters:
  377. ;
  378. ;++++++++++++++++++++++++++++++++++++
  379.  
  380. NoTitle         = 0
  381. KeyNull         = ""
  382. KeyProduct      = ""
  383. KeyParameters   = ""
  384.  
  385. ;++++++++++++++++++++++++++++++++++++
  386. ;
  387. ; Other Initialization Parameters:
  388. ;
  389. ;++++++++++++++++++++++++++++++++++++
  390.  
  391. ExitState               = "Active"
  392. OldVersionExisted       = $(FALSE)
  393.  
  394. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  395. ; LANGUAGE-DEPENDENT DIALOG CONSTANTS SECTION
  396. ; -------------------------------------------
  397. ; This section is responsible for defining dialog constants that are 
  398. ; language dependent.  
  399. ;
  400. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  401.  
  402. ;++++++++++++++++++++++++++++++++++++
  403. ;
  404. ; Common Button Names:
  405. ;
  406. ;++++++++++++++++++++++++++++++++++++
  407.  
  408. [DialogConstantsENG]
  409. Help                    = "&Help"
  410. Exit                    = "C&ancel"
  411. Continue                = "&Continue"
  412. Cancel                  = "C&ancel"
  413. OK                      = "&OK"
  414. HelpContext             = ""
  415.  
  416. ;++++++++++++++++++++++++++++++++++++
  417. ;
  418. ; SDLC Card Types:
  419. ;
  420. ;++++++++++++++++++++++++++++++++++++
  421. [SDLCDriverNumbers_ENG]
  422. ; quite stupid, I know ...
  423. "01"                = 01
  424. "02"                = 02
  425. "03"                = 03
  426. "04"                = 04
  427. "05"                = 05
  428. "06"                = 06
  429. "07"                = 07
  430. "08"                = 08
  431.  
  432.  
  433. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  434. ;
  435. ; LANGUAGE-DEPENDENT FILE CONSTANTS SECTION
  436. ; -----------------------------------------
  437. ; This section is responsible for defining language dependent information.
  438. ;
  439. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  440.  
  441. [FileConstantsENG]
  442.  
  443. ;
  444. ; The following name should include the name of the IHV as per the example
  445. ;
  446. SetupTitle      = "Eicon SDLC Link Service Setup"
  447.  
  448. [FileConstantsECSDLCLS_ENG]
  449. ProductTitle    = "Eicon SDLC Link Service"
  450. ProductDesc     = "Eicon SDLC Link Support for SNA Server"
  451.  
  452. ;[FileConstantsECSDLCDD_ENG]
  453. ;ProductTitle   = "Eicon SDLC/X.25 Device Driver"
  454. ;ProductDesc    = "Eicon SDLC/X.25 Device Driver for SNA Server"
  455.  
  456. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  457. ;
  458. ; DATE SECTION
  459. ; ------------
  460. ; This section is responsible for establishing the value of the "Now"
  461. ; variable.  This variable is a list of the following format:
  462. ;       { Seconds from 1-1-1970, Year, Month, Day, Hour, Minute, Second }
  463. ;       
  464. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  465.  
  466. [LoadSetupLibrary]
  467.   LoadLibrary "x" $(!STF_WINDOWSSYSPATH)\setupdll.dll !LIBHANDLE 
  468.   exit
  469.  
  470. [date]
  471.   Now = {} ? $(!LIBHANDLE) GetSystemDate
  472.  
  473. [FreeSetupLibrary]
  474.   FreeLibrary $(!LIBHANDLE)
  475.   exit
  476.  
  477.  
  478. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  479. ;
  480. ; INPUT DIALOGS SECTION
  481. ; ---------------------
  482. ; This section should contain all the information about the input dialogs.
  483. ;
  484. ; FORMAT:
  485. ; The format of the section name is the string name concatenated with the 
  486. ; Language represented by the section.
  487. ;       [InputDialog1LNG1]
  488. ;               ...
  489. ;       [InputDialog2LNG1]
  490. ;               ...
  491. ;       
  492. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  493.  
  494. [DoSDLCLSConfigENG]
  495. DlgTemplate             = IDD_SDLCSETUP
  496. ;DlgType                        = "MultiEdit"
  497. DlgType                 = "RadioCombination"
  498. Caption                 = $(!P:SetupTitle)
  499. DlgText1                = "Service Name: "$(ServiceName)
  500. EditLabel1              = "&Title:"
  501. EditTextIn              = { $(ServiceTitle) }
  502. EditTextLim             = { 40 }
  503. ComboLabel1             = "Car&d Port:"
  504. NotifyFields            = { "NO" }
  505. RadioGroup              = "Line T&ype"
  506. RadioText1              = "&Leased"
  507. RadioText2              = "Switched: SNA &Server-Stored Number"
  508. RadioText3              = "Switched: &Modem-Stored Number"
  509. RadioText4              = "Switched: Ma&nual Dial"
  510. RadioOptionsGreyed      = {}
  511. CheckText1              = "Constant Ca&rrier"
  512. CBOptionsGreyed         = {}
  513. ;HelpContext            = #( HelpContextIDs, $(DlgTemplate), 1 )
  514. HelpContext            = 80
  515. Advanced                = "Ad&vanced"
  516. Other1                  = "Ad&vanced"
  517. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  518. ;
  519. ; INPUT DIALOGS SCRIPTS
  520. ; ---------------------
  521. ; This section should contain all the scripts for doing input dialogs.
  522. ; Each script may return as many parameters as it wants, so long as the 
  523. ; first parameter is the status and is one of the following:
  524. ;
  525. ;               STATUS_SUCCESSFUL
  526. ;               STATUS_FAILED
  527. ;               STATUS_USERCANCEL
  528. ;               STATUS_USERBACK
  529. ;
  530. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  531.  
  532. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  533. ;
  534. ; DoSDLCLSConfig:
  535. ;
  536. ; DESCRIPTION:  This shell script pops up a dialog to get the configuration
  537. ;                               of this product.
  538. ;
  539. ; INPUT:        $($0) : Service Name
  540. ;                               $($1) : Current Title
  541. ;                               $($2) : Current Card Type
  542. ;                               $($3) : Current Line Type
  543. ;                               $($4) : Current Carrier
  544. ;
  545. ; OUTPUT:       $($R0): STATUS: One of the above
  546. ;                               $($R1): New Title
  547. ;                               $($R2): New Card Type (01 - 06)
  548. ;                               $($R3): New Line Type
  549. ;                               $($R4): New Carrier
  550. ;
  551. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  552.  
  553. [DoSDLCLSConfig]
  554.  
  555. more_ui = +
  556.     set ServiceName         = $($0)
  557.     set ServiceTitle        = $($1)
  558.     set DriverNumber        = $($2)
  559.     set LineType            = $($3)
  560.     set Carrier             = $($4)
  561.  
  562.     set SvDriverNumber      = $($2)
  563.     set SvLineType          = $($3)
  564.     set SvCarrier           = $($4)
  565.  
  566.     set Changes = 0
  567.  
  568.     read-syms DialogConstants
  569.     read-syms DialogConstants$(!STF_LANGUAGE)
  570.     read-syms DoSDLCLSConfig$(!STF_LANGUAGE)
  571.  
  572.     
  573.     ;
  574.     ; set the default values
  575.     ;
  576.     set Status = STATUS_SUCCESSFUL
  577.  
  578. ;       set-sub Temp            = $(DriverNumber), 1
  579.     set Temp                = $(DriverNumber)
  580.     set ComboListIn1        = ^( SDLCDriverNumbers"_"$(!STF_LANGUAGE), 0 )
  581.     set ComboListOut1       = *( $(ComboListIn1), $(Temp) )
  582.     set ComboListItemsIn    = { ComboListIn1 }
  583.     set ComboListItemsOut   = { ComboListOut1 }
  584.  
  585.     set-add Temp            = $(LineType), 1
  586.     set RadioIn             = { *( {1,3,2}, $(Temp)) }
  587.  
  588.  
  589.     ifint $(Carrier) == 0
  590.         set CheckItemsIn = { "OFF" }
  591.     else
  592.         set CheckItemsIn = { "ON" }
  593.     endif
  594.  
  595.  
  596.     ui start $(DlgTemplate) $(!IHVDLGHANDLE)
  597.  
  598.     ifstr(i) $(DLGEVENT) == "DLGBUTTON1"
  599.         ui pop 1
  600.             OpenRegKey $(!REG_H_LOCAL), "", +
  601.               "Software\Eicon\Ecnb\CurrentVersion", +
  602.               $(!REG_KEY_READ), KeyWANServices
  603.             ifstr(i) $(KeyWANServices) != {}
  604.                 GetRegValue $(KeyWANServices) "RootPath" RootPathValue
  605.                 ifstr(i) $(RootPathValue) != ""
  606.                     set !WANRootDir = *( $(RootPathValue), 4 )
  607.                 endif
  608.             endif
  609.  
  610.             RunProgram ExitCode "" "" $(!WANRootDir)\eccfgwnt.exe $(!WANRootDir)\eccfg.eic /DD /DA
  611.         goto more_ui
  612.     endif
  613.     
  614.     ifstr(i) $(DLGEVENT) == "Exit"
  615.         set Status = STATUS_USERCANCEL
  616.     else
  617.         set Status = STATUS_SUCCESSFUL
  618.  
  619.         set ServiceTitle = *( $(EditTextOut), 1 )
  620.         set DriverNumber = #( SDLCDriverNumbers"_"$(!STF_LANGUAGE), +
  621.                     $(ComboListOut1), 1 )
  622. ;               set DriverNumber                = *( $(EditTextOut), 2 )
  623.         
  624.  
  625.         set LineType     = *( {0,2,1,1}, *( $(RadioOut), 1 ) )
  626.  
  627.         ifstr(i) *( $(CheckItemsOut), 1 ) == "OFF"
  628.             set Carrier = 0
  629.         else
  630.             set Carrier = 1
  631.         endif
  632.  
  633.         ifstr(i) $(DriverNumber) != $(SvDriverNumber)
  634.           set Changes = 1
  635.         endif
  636.  
  637.         ifstr(i) $(LineType) != $(SvLineType)
  638.           set Changes = 1
  639.         endif
  640.  
  641.         ifstr(i) $(Carrier) != $(SvCarrier)
  642.           set Changes = 1
  643.         endif
  644.     endif
  645.  
  646.     ui pop 1
  647.  
  648.     Return $(Status), $(Changes), $(ServiceTitle), +
  649.            $(DriverNumber), $(LineType), $(Carrier)
  650.  
  651. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  652. ;
  653. ; Identify
  654. ;
  655. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  656. ;                as we are choosing currently.
  657. ;
  658. ; INPUT:         None
  659. ;
  660. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  661. ;                $($R1): Option Type (COMPUTER ...)
  662. ;                $($R2): Diskette description
  663. ;
  664. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  665.  
  666. [Identify]
  667.  
  668.     read-syms Identification
  669.  
  670.     set Status     = STATUS_SUCCESSFUL
  671.     set Identifier = $(OptionType)
  672.     set Media      = #(Source Media Descriptions, 1, 1)
  673.  
  674.     Return $(Status) $(Identifier) $(Media)
  675.  
  676. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  677. ;
  678. ; ReturnOptions
  679. ;
  680. ; DESCRIPTION:   To return the option list supported by this INF and the
  681. ;                localised text list representing the options.
  682. ;
  683. ;
  684. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  685. ;
  686. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  687. ;                                STATUS_NOLANGUAGE
  688. ;                                STATUS_FAILED
  689. ;
  690. ;                $($R1): Option List
  691. ;                $($R2): Option Text List
  692. ;
  693. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  694.  
  695. [ReturnOptions]
  696.  
  697.     set Status          = STATUS_FAILED
  698.     set OptionList      = {}
  699.     set OptionTextList  = {}
  700.  
  701.     ;
  702.     ; Check if the language requested is supported
  703.     ;
  704.     set LanguageList = ^(LanguagesSupported, 1)
  705.     ifcontains(i) $($0) in $(LanguageList)
  706.     goto returnoptions
  707.     else
  708.     set Status = STATUS_NOLANGUAGE
  709.     goto finish_ReturnOptions
  710.     endif
  711.  
  712. ;++++++++++++++++++++++++++++++++++++
  713. ;
  714. ; returnoptions:
  715. ; get the options from the Options and OptionsText sections and set appropriate
  716. ; return values.
  717. ;++++++++++++++++++++++++++++++++++++
  718. returnoptions = +
  719.     set OptionList     = ^(Options, 1)
  720.     set OptionTextList = ^(OptionsText$($0), 1)
  721.     set Status         = STATUS_SUCCESSFUL
  722.  
  723. ;++++++++++++++++++++++++++++++++++++
  724. ;
  725. ; finish_ReturnOptions:
  726. ;++++++++++++++++++++++++++++++++++++
  727. finish_ReturnOptions = +
  728.     Return $(Status) $(OptionList) $(OptionTextList)
  729.  
  730. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  731. ;
  732. ; ReturnSNAOptions
  733. ;
  734. ; DESCRIPTION:   To return the option list supported by this INF and 
  735. ;                recognized by SNA Server.  This script also returns
  736. ;                the localized text list representing those options.
  737. ;
  738. ;
  739. ; INPUT:         None
  740. ;
  741. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  742. ;                                STATUS_NOLANGUAGE
  743. ;                                STATUS_FAILED
  744. ;
  745. ;                $($R1): Option List
  746. ;                $($R2): Option Text List
  747. ;
  748. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  749.  
  750. [ReturnSNAOptions]
  751.  
  752.     set Status                          = STATUS_FAILED
  753.     set SNAOptionList           = {}
  754.     set SNAOptionTextList       = {}
  755.  
  756.     set LANG                                = $(!STF_LANGUAGE)
  757.     ;
  758.     ; Check if the language requested is supported
  759.     ;
  760.     set LanguageList = ^(LanguagesSupported, 1)
  761.     ifcontains(i) $(LANG) in $(LanguageList)
  762.     goto returnSNAoptions
  763.     else
  764.     set Status = STATUS_NOLANGUAGE
  765.     goto finish_ReturnSNAOptions
  766.     endif
  767.  
  768. ;++++++++++++++++++++++++++++++++++++
  769. ;
  770. ; returnSNAoptions:
  771. ; get the options from the Options and OptionsText sections and set appropriate
  772. ; return values.
  773. ;++++++++++++++++++++++++++++++++++++
  774. returnSNAoptions = +
  775.     set SNAOptionList           = ^(SNAOptions, 1)
  776.     set OptionList                      = ^(Options, 1)
  777.     set SNAOptionTextList       = {}
  778.     set Status                          = STATUS_SUCCESSFUL
  779.  
  780.     ;
  781.     ; Check that each of the SNA Options is a valid option and compile
  782.     ; the list of text descriptions
  783.     ;
  784.     ForListDo $(SNAOptionList)
  785.         ifcontains $($) in $(OptionList)
  786.             set SNAOptionTextList = >( $(SNAOptionTextList), +
  787.                                        #(OptionsText$(LANG), $($), 1) )
  788.         else
  789.             set Status = STATUS_FAILED
  790.             goto finish_ReturnSNAOptions
  791.         endif
  792.         ; TODO: whenever language gets checked, they use an (i) check.
  793.         ;       the question is: are section names case sensitive or case
  794.         ;       insensitive.  if they are case insensitive, might as well
  795.         ;       make this a case insensitive check.  if they are case 
  796.         ;       sensitive, report this as a bug.
  797.         ;       CODENAME: CASECHECK
  798.     EndForListDo
  799.  
  800. ;++++++++++++++++++++++++++++++++++++
  801. ;
  802. ; finish_ReturnSNAOptions:
  803. ;++++++++++++++++++++++++++++++++++++
  804. finish_ReturnSNAOptions = +
  805.     Return $(Status) $(SNAOptionList) $(SNAOptionTextList)
  806.  
  807. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  808. ;
  809. ; ReturnSNAAdds
  810. ;
  811. ; DESCRIPTION:   To return the list of dependencies and their text 
  812. ;                descriptions for a particular option. 
  813. ;
  814. ;
  815. ; INPUT:         $($0):  Option used.
  816. ;
  817. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  818. ;                                STATUS_NOLANGUAGE
  819. ;                                STATUS_FAILED
  820. ;
  821. ;                $($R1): Dependency List
  822. ;                $($R2): Dependency Text List
  823. ;
  824. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  825.  
  826. [ReturnSNAAdds]
  827.  
  828.     set Status                          = STATUS_FAILED
  829.     set SNAAddList              = {}
  830.     set SNAAddTextList          = {}
  831.  
  832.     set LANG                                = $(!STF_LANGUAGE)
  833.     ;
  834.     ; Check if the language requested is supported
  835.     ;
  836.     set LanguageList = ^(LanguagesSupported, 1)
  837.     ifcontains(i) $(LANG) in $(LanguageList)
  838.     goto returnSNAadds
  839.     else
  840.     set Status = STATUS_NOLANGUAGE
  841.     goto finish_ReturnSNAAdds
  842.     endif
  843.  
  844. ;++++++++++++++++++++++++++++++++++++
  845. ;
  846. ; returnSNAadds:
  847. ; get the additional options for an option and compile their text list
  848. ;++++++++++++++++++++++++++++++++++++
  849. returnSNAadds = +
  850.     set SNAAddList                  = ^(SNAOptionAdds$($0), 1)
  851.     set OptionList                      = ^(Options, 1)
  852.     set Status                          = STATUS_SUCCESSFUL
  853.  
  854.     ;
  855.     ; Check that each of the SNA Dependencies is a valid option and compile
  856.     ; the list of text descriptions
  857.     ;
  858.     ForListDo $(SNAAddList)
  859.         ifcontains $($) in $(OptionList)
  860.             set   SNAAddTextList  = >( $(SNAAddTextList), +
  861.                                        #(OptionsText$(LANG), $($), 1) )
  862.         else
  863.             set Status = STATUS_FAILED
  864.             goto finish_ReturnSNAAdds
  865.         endif
  866.         ; TODO: Check CODENAME: CASECHECK
  867.     EndForListDo
  868.  
  869. ;++++++++++++++++++++++++++++++++++++
  870. ;
  871. ; finish_ReturnSNAAdds:
  872. ;++++++++++++++++++++++++++++++++++++
  873. finish_ReturnSNAAdds = +
  874.     Return $(Status) $(SNAAddList) $(SNAAddTextList)
  875.  
  876. ;************************************************************************
  877. ;************************************************************************
  878. ;                    SNA INVOCATION SECTION
  879. ;************************************************************************
  880. ;************************************************************************
  881.  
  882. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  883. ;
  884. ; SnaInvocation 
  885. ;
  886. ; DESCRIPTION:   To perform operations requested by the SNA Setup
  887. ;
  888. ; INPUT:         NTN_XXXXX  and STF_XXXXX  variables defined
  889. ;
  890. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  891. ;                                STATUS_NOLANGUAGE |
  892. ;                                STATUS_USERCANCEL |
  893. ;                                STATUS_FAILED
  894. ;
  895. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  896.  
  897. [SnaInvocation]
  898.     set LongOption = $(!NTN_InfOption)
  899.     set Changes    = 0
  900.     set Instance   = "xx"
  901.  
  902.     Split-String $(LongOption) "_" OptionList
  903.     QueryListSize OptionSize $(OptionList)
  904.  
  905.     ifint $(OptionSize) == 3
  906.         set Option   = *( $(OptionList), 1 )
  907.         set Instance = *( $(OptionList), 3 )
  908.     else
  909.         set Option = $(LongOption)
  910.     endif
  911.  
  912.     ;
  913.     ; These three variables describe the execution of the installation.
  914.     ;   AddCopy adds the files in the file list to the copy list
  915.     ;   DoCopy actually copies the files on the spot
  916.     ;
  917.     ifstr(i) $(!NTN_InstallMode) == install
  918.     read-syms InstallSteps$(Option)
  919.     set !AddCopy  = $(AddFilesToCopyList)
  920.     set !DoCopy   = $(CopyFilesInCopyList)
  921.  
  922.     ifstr(i) $(!NTN_InfType) == "LOCAL"
  923.       set !AddCopy = NO
  924.       set !DoCopy  = NO
  925.     endif
  926.     Else
  927.     set !AddCopy  = NO
  928.     set !DoCopy   = NO
  929.     Endif
  930.  
  931.     shell "" CommonSection $(Option) $(Instance)
  932.  
  933.     set Status     = $($R0)
  934.     set ReturnData = $($R1)
  935.     set Changes    = $($R2)
  936.  
  937.     Return $(Status) $(ReturnData) $(Changes)
  938.  
  939. ;************************************************************************
  940. ;************************************************************************
  941. ;                    NCPA INVOCATION SECTION
  942. ;************************************************************************
  943. ;************************************************************************
  944.  
  945. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  946. ;
  947. ; InstallOption 
  948. ;
  949. ; DESCRIPTION:   To perform operations requested by the NCPA
  950. ;
  951. ; INPUT:         NTN_XXXXX  and STF_XXXXX  variables defined
  952. ;
  953. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  954. ;                                STATUS_NOLANGUAGE |
  955. ;                                STATUS_USERCANCEL |
  956. ;                                STATUS_FAILED
  957. ;
  958. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  959.  
  960. [InstallOption]
  961.     set LongOption = $(!NTN_InfOption)
  962.     set Changes    = 0
  963.     set Instance   = "xx"
  964.  
  965.     Split-String $(LongOption) "_" OptionList
  966.     QueryListSize OptionSize $(OptionList)
  967.  
  968.     ifint $(OptionSize) == 3
  969.     set Option   = *( $(OptionList), 1 )
  970.     set Instance = *( $(OptionList), 3 )
  971.     else
  972.     set Option = $(LongOption)
  973.     endif
  974.  
  975.     ;
  976.     ; These three variables describe the execution of the installation.
  977.     ;   AddCopy adds the files in the file list to the copy list
  978.     ;   DoCopy actually copies the files on the spot
  979.     ;
  980.     ifstr(i) $(!NTN_InstallMode) == "install"
  981.     read-syms InstallSteps$(Option)
  982.     set !AddCopy  = YES
  983.     set !DoCopy   = YES
  984.     Else
  985.     set !AddCopy  = NO
  986.     set !DoCopy   = NO
  987.     Endif
  988.  
  989.     ;
  990.     ; Set SNA Root Directory before reading File Constants
  991.     ;
  992.     OpenRegKey $(!REG_H_LOCAL), "", +
  993.     "Software\Microsoft\SNA Server\2.0\Setup", +
  994.     $(!REG_KEY_READ), KeySNAServices
  995.     ifstr(i) $(KeySNAServices) != {}
  996.       GetRegValue $(KeySNAServices) "RootDir" RootDirValue
  997.       ifstr(i) $(RootDirValue) != ""
  998.     set !SNARootDir = *( $(RootDirValue), 4 )
  999.       endif
  1000.     endif
  1001.  
  1002.     shell $(!UtilityInf) GetBusType
  1003.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  1004.       set !STF_BUSTYPE = $($R1)
  1005.     else
  1006.       set !STF_BUSTYPE = "ISA"
  1007.     endif
  1008.  
  1009.     ifstr(i) $(!NTN_InstallMode) != "install"
  1010.         read-syms FileConstants
  1011.         read-syms FileConstants$(Option)
  1012.  
  1013.         OpenRegKey $(!REG_H_LOCAL), "", +
  1014.                    $(ProductRegBase)"\"$(ProductFullName)"\CurrentVersion", +
  1015.                    $(!REG_KEY_READWRITE), KeyServiceIndex
  1016.         ifstr(i) $(KeyServiceIndex) == ""
  1017.             set ErrMesg = "Can't Find This Product Instance."
  1018.             set ErrProc = "InstallOption"
  1019.             set ErrFunc = "OpenRegKey (1)"
  1020.             goto fatal_registry
  1021.         endif
  1022.         GetRegValue $(KeyServiceIndex), "SNAVersion", SNAVersionInfo
  1023.         set !SNAVersion = *( $(SNAVersionInfo), 4 )
  1024.         CloseRegKey $(KeyServiceIndex)
  1025.  
  1026.         ;
  1027.         ; This is a Hack.
  1028.         ; Since the NCPA can (now) only configure and remove components, we'll
  1029.         ; assume that it's going to access them inside the SNA Server 
  1030.         ; root directory and not in floppy like install would.  Therefore,
  1031.         ; DriverDir = SNARootDir.
  1032.         ; At some future point in time, we might consider putting a path in the
  1033.         ; registry.
  1034.         ;
  1035.         set !DriverDir = $(!SNARootDir)"\system\hwsetup\"
  1036.  
  1037.     else
  1038.         ;
  1039.         ; This case shouldn't happen, but I honestly don't know how to deal
  1040.         ; with it when it does.  I guess I can check if SNA Server is
  1041.         ; installed, and if it's not, tell the user that it must be installed
  1042.         ; before link support can be installed
  1043.         ;
  1044.         set Hosed = "Probably"
  1045.     endif
  1046.  
  1047.     LoadLibrary "" $(DialogLibrary) !DLGHANDLE
  1048.         
  1049.     shell "" CommonSection $(Option) $(Instance)
  1050.     set Status = $($R0)
  1051.  
  1052.     ifstr(i) $($R2) == 1
  1053.       shell $(!SubroutineInf) SetupMessage $(!STF_LANGUAGE) "STATUS" +
  1054.         "For the changed parameters to be noticed, you must stop and"$(!LF)+
  1055.         "restart this link service with the SNA Server Admin program."
  1056.  
  1057.     else-ifstr(i) $($R2) == 2
  1058.       shell $(!SubroutineInf) SetupMessage $(!STF_LANGUAGE) "STATUS" +
  1059.         "You must reboot for the changed parameters to be noticed."
  1060.     endif
  1061.  
  1062.     FreeLibrary $(!DLGHANDLE)
  1063.  
  1064.     Return $(Status) {} $(Changes)
  1065.  
  1066. fatal_registry = +
  1067.  
  1068.     set Error = +
  1069.         "Fatal Registry Error:"$(!LF)+
  1070.         $(ErrMesg)$(!LF)+
  1071.         "File: "$(ThisInf)$(!LF)+
  1072.         "Procedure: "$(ErrProc)$(!LF)+
  1073.         "Function: "$(ErrFunc)
  1074.  
  1075.     shell $(SubroutineInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(Error)
  1076.  
  1077.     Return STATUS_FAILED
  1078.  
  1079. ;************************************************************************
  1080. ;************************************************************************
  1081. ;                   COMMON SECTION
  1082. ;************************************************************************
  1083. ;************************************************************************
  1084.  
  1085. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  1086. ;
  1087. ; CommonSection
  1088. ;
  1089. ; DESCRIPTION:   To carry out the install/config/etc. operations
  1090. ;
  1091. ; INPUT:         NTN_XXXXX  and STF_XXXXX  variables defined
  1092. ;                $($0):  Option to be used
  1093. ;                $($1):  Instance to be used
  1094. ;
  1095. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  1096. ;                                STATUS_NOLANGUAGE |
  1097. ;                                STATUS_EXISTS     |
  1098. ;                                STATUS_USERCANCEL |
  1099. ;                                STATUS_FAILED
  1100. ;
  1101. ;()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
  1102.  
  1103. [CommonSection]
  1104.  
  1105.     StartWait
  1106.  
  1107.     set Option   = $($0)
  1108.     set Instance = $($1)
  1109.     set Index    = "CurrentVersion"
  1110.     set RetData  = {}
  1111.     set Changes  = 0
  1112.  
  1113.     ;
  1114.     ; Check if the language requested is supported
  1115.     ;
  1116.     set LanguageList = ^(LanguagesSupported, 1)
  1117.     ifcontains(i) $(!STF_LANGUAGE) in $(LanguageList)
  1118.     goto languageexists
  1119.     else
  1120.     set Status = STATUS_NOLANGUAGE
  1121.     goto end
  1122.     endif
  1123.  
  1124.     
  1125. ;++++++++++++++++++++++++++++++++++++
  1126. ;
  1127. ; languageexists:
  1128. ;
  1129. ;++++++++++++++++++++++++++++++++++++
  1130. languageexists = +
  1131.  
  1132.     ;
  1133.     ; Define some constants, read some variable sections, and set the date
  1134.     ;
  1135.  
  1136.     StartWait
  1137.  
  1138.     read-syms GeneralConstants
  1139.  
  1140.     read-syms FileConstants
  1141.     read-syms FileConstants$(!STF_LANGUAGE)
  1142.     read-syms FileConstants$(Option)
  1143.     read-syms FileConstants$(Option)_$(!STF_LANGUAGE)
  1144.  
  1145.     install LoadSetupLibrary
  1146.     detect date
  1147.     install FreeSetupLibrary
  1148.  
  1149.     SetHelpFile $(!DriverDir)$(ThisHlp) $(HlpMin) $(HlpMax)
  1150.  
  1151.     LoadLibrary "" $(!DriverDir)$(ThisSrl) !IHVDLGHANDLE
  1152.     ifstr(i) $(!IHVDLGHANDLE) == ""
  1153.     goto set_status_failed
  1154.     endif
  1155.     
  1156.     set to   = Begin
  1157.     set from = Begin
  1158.  
  1159.     ;
  1160.     ; Assume that all is well as we begin
  1161.     ;
  1162.     set CommonStatus = STATUS_SUCCESSFUL
  1163.  
  1164.     EndWait
  1165.  
  1166.  
  1167. ;++++++++++++++++++++++++++++++++++++
  1168. ;
  1169. ; Begin:
  1170. ; Set up the operation-mode-based variables and gaily welcome
  1171. ; the user.  if the "install mode" variable is improperly set,
  1172. ; assume this is a new installation.
  1173. ;
  1174. ;++++++++++++++++++++++++++++++++++++
  1175. Begin = +
  1176.     ifstr(i)      $(!NTN_InstallMode)   == deinstall
  1177.     set StartLabel = remove_component
  1178.     else-ifstr(i) $(!NTN_InstallMode)   == fullremove
  1179.     set StartLabel = remove_component
  1180.     else-ifstr(i) $(!NTN_InstallMode)   == snaremove
  1181.     set StartLabel = remove_component
  1182.     else-ifstr(i) $(!NTN_InstallMode)   == getbindings
  1183.     set StartLabel = getbind_component
  1184.     else-ifstr(i) $(!NTN_InstallMode)   == bind
  1185.     set StartLabel = bind_component
  1186.     else-ifstr(i) $(!NTN_InstallMode)   == configure
  1187.     set StartLabel = config_component
  1188.     else                                ;; install
  1189.     set StartLabel = install_component
  1190.     endif
  1191.  
  1192.     goto set_defaults_$(Option)
  1193.  
  1194.     ;++++++++++++++++++++++++++++++++++++
  1195.     ;
  1196.     ; set_defaults_ECSDLCLS
  1197.     ;
  1198.     ;++++++++++++++++++++++++++++++++++++
  1199.     set_defaults_ECSDLCLS = +
  1200.     set ServiceName   = $(Option)
  1201.     set ServiceTitle  = $(ProductTitle)
  1202.     set ServiceDesc   = $(ProductDesc)
  1203.     set DriverNumber  = "1" ; Eicon SDLC 1
  1204.     set LineType      = "0" ; Leased
  1205.     set Carrier       = "0" ; Not constant
  1206.     goto finish_defaults
  1207.  
  1208.     ;++++++++++++++++++++++++++++++++++++
  1209.     ;
  1210.     ; set_defaults_ECSDLCDD
  1211.     ;
  1212.     ;++++++++++++++++++++++++++++++++++++
  1213. ;    set_defaults_ECSDLCDD = +
  1214. ;       set ServiceName   = $(Option)
  1215. ;       set ServiceTitle  = $(ProductTitle)
  1216. ;       set ServiceDesc   = $(ProductDesc)
  1217. ;       goto finish_defaults
  1218.  
  1219. ;++++++++++++++++++++++++++++++++++++
  1220. ;
  1221. ; finish_defaults:
  1222. ;
  1223. ;++++++++++++++++++++++++++++++++++++
  1224. finish_defaults = +
  1225.     set from = end
  1226.     set to   = end
  1227.     goto $(StartLabel)
  1228.  
  1229. ;++++++++++++++++++++++++++++++++++++
  1230. ;
  1231. ; install_component:
  1232. ;
  1233. ;++++++++++++++++++++++++++++++++++++
  1234. install_component = +
  1235.     ;
  1236.     ; First, check if there are any existing services of this product
  1237.     ; already in the registry.
  1238.     ;
  1239.     shell $(UtilityInf) FindSNAProductServices, +
  1240.                   $(ProductRegBase), $(ProductFullName)
  1241.     ifint $($ShellCode) != 0
  1242.         goto ShellCodeError
  1243.     endif
  1244.  
  1245.     set Status              = $($R0)
  1246.     set SvcIndexList        = $($R1)
  1247.     set SvcNameList         = $($R2)
  1248.     set SvcTitleList        = $($R3)
  1249.     set SvcDescList         = $($R4)
  1250.  
  1251.     ifstr(i) $(Status) == STATUS_FAILED
  1252.         set ErrMesg = "Can't Find This Product."
  1253.         set ErrProc = "install_component"
  1254.         set ErrFunc = "FindSNAProductServices"
  1255.         goto fatal_registry
  1256.     endif
  1257.  
  1258.     ;
  1259.     ; if there are no services of this product installed, it could mean
  1260.     ; that the product doesn't exist.  Either way, we are installing service
  1261.     ; index "01" and on to modify params.
  1262.     ;
  1263.  
  1264.     QueryListSize SvcIndexListSize $(SvcIndexList)
  1265.  
  1266.     set ProductExists = $(TRUE)
  1267.  
  1268.     ifint $(SvcIndexListSize) == 0
  1269.         ifstr(i) $(Status) == STATUS_NOSUCHPRODUCT
  1270.           set ProductExists = $(FALSE)
  1271.         endif
  1272.         set Instance = "01"
  1273.         goto install_nextstep
  1274.     endif
  1275.  
  1276.     ;
  1277.     ; If there is one instance of this service and this product is an
  1278.     ; exclusive install, return with the appropriate status.
  1279.     ;
  1280.     ifint $(ProductExclusive) != $(FALSE)
  1281.       ifint $(SvcIndexListSize) == 1
  1282.         set Status = STATUS_EXISTS
  1283.         ifint $(ProductExclusive) == $(NOTIFY)
  1284.           shell $(SubroutineInf) SetupMessage $(!STF_LANGUAGE) NONFATAL +
  1285.               "This product is already installed and"$(!LF)+
  1286.               "can only be installed once."
  1287.         endif
  1288.         goto end
  1289.       endif
  1290.     endif
  1291.  
  1292.     shell $(UtilityInf) FindNextAvailableIndex $(SvcIndexList)
  1293.     ifint $($ShellCode) != 0
  1294.         goto ShellCodeError
  1295.     endif
  1296.  
  1297.     set Status   = $($R0)
  1298.     set Instance = $($R1)
  1299.  
  1300.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  1301.         goto end
  1302.     endif
  1303.  
  1304. ;++++++++++++++++++++++++++++++++++++
  1305. ;
  1306. ; install_nextstep:
  1307. ; we have a service index and are ready to start the
  1308. ; process of installing an instance.
  1309. ;
  1310. ;++++++++++++++++++++++++++++++++++++
  1311. install_nextstep = +
  1312.     read-syms FileConstants$(Option)
  1313.  
  1314.     ifint $(ProductServiceQuery) == $(TRUE)
  1315.         shell $(UtilityInf) EnterServiceName, +
  1316.                     $(ProductTitle), +
  1317.                     $(ProductServicePrefix), +
  1318.                     $(Instance)
  1319.         ifint $($ShellCode) != 0
  1320.             goto ShellCodeError
  1321.         endif
  1322.     
  1323.         set Status      = $($R0)
  1324.         set ServiceName = $($R1)
  1325.  
  1326.         ifstr(i) $(Status) != STATUS_SUCCESSFUL
  1327.             goto end
  1328.         endif
  1329.     else
  1330.         set ServiceName  = $(ProductServicePrefix)
  1331.     endif
  1332.  
  1333.     goto modify_params
  1334.  
  1335. ;++++++++++++++++++++++++++++++++++++
  1336. ;
  1337. ; config_component:
  1338. ; get the current values for all the parameters and prepare them for
  1339. ; modify_params.
  1340. ;
  1341. ;++++++++++++++++++++++++++++++++++++
  1342. config_component = +
  1343.     read-syms FileConstants$(Option)
  1344.  
  1345.     ;
  1346.     ; Try and open this product and see if it's even installed.
  1347.     ;
  1348.  
  1349.     shell $(UtilityInf) FindSNAProductServices $(ProductRegBase), +
  1350.                            $(ProductFullName)
  1351.     ifint $($ShellCode) != 0
  1352.         goto ShellCodeError
  1353.     endif
  1354.  
  1355.     set Status       = $($R0)
  1356.     set SvcIndexList = $($R1)
  1357.     set SvcNameList  = $($R2)
  1358.     set SvcTitleList = $($R3)
  1359.     set SvcDescList  = $($R4)
  1360.  
  1361.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  1362.         set ErrMesg = "Can't Find This Product."
  1363.         set ErrProc = "config_component"
  1364.         set ErrFunc = "FindSNAProductServices"
  1365.         goto fatal_registry
  1366.     endif
  1367.  
  1368.     shell $(UtilityInf) GrepUniqueServiceInfo "Index", +
  1369.                            $(Instance), +
  1370.                            $(SvcIndexList), +
  1371.                            $(SvcNameList),+
  1372.                            $(SvcTitleList),+
  1373.                            $(SvcDescList)
  1374.     ifint $($ShellCode) != 0
  1375.         goto ShellCodeError
  1376.     endif
  1377.  
  1378.     set Status       = $($R0)
  1379.     set ServiceIndex = $($R1)       
  1380.     set ServiceName  = $($R2)
  1381.     set ServiceTitle = $($R3)
  1382.     set ServiceDesc  = $($R4)
  1383.  
  1384.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  1385.         goto end
  1386.     endif
  1387.  
  1388. ;++++++++++++++++++++++++++++++++++++
  1389. ;
  1390. ; read_params:
  1391. ; read the parameters from the SCA and assign them to the appropriate
  1392. ; variables.
  1393. ;
  1394. ;++++++++++++++++++++++++++++++++++++
  1395. read_params = +
  1396.  
  1397.     ;
  1398.     ; Find the entry in the Service Control Architecture and get a handle
  1399.     ; to the Parameters Key and to the ExtraParameters key if one exists.
  1400.     ;
  1401.  
  1402.     shell $(UtilityInf) FindSNAService, $(ServiceName)
  1403.     ifint $($ShellCode) != 0
  1404.         goto ShellCodeError
  1405.     endif
  1406.  
  1407.     set Status                      = $($R0)
  1408.     set KeyService          = $($R1)
  1409.     set KeyParameters       = $($R2)
  1410.     set KeyExtraParams      = $($R3)
  1411.  
  1412.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  1413.         CloseRegKey $(KeyService)
  1414.         CloseRegKey $(KeyParameters)
  1415.         CloseRegKey $(KeyExtraParams)
  1416.         set ErrMesg = "Can't Find Service Entry For Instance"$(ServiceName)
  1417.         set ErrProc = "read_params"
  1418.         set ErrFunc = "FindSNAService"
  1419.         goto fatal_registry
  1420.     endif
  1421.  
  1422.     set OldVersionExisted = $(TRUE)
  1423.  
  1424.     set ValueName = ""
  1425.     set ValueData = ""
  1426.     set ValueStr  = ""
  1427.     set ValueList = {}
  1428.  
  1429.     ;
  1430.     ; Get the old values from the parameters key
  1431.     ;
  1432.     EnumRegValue $(KeyParameters) ValueList
  1433.  
  1434.     ;
  1435.     ; if there's an ExtraParameters subkey, add those values to the list
  1436.     ;
  1437.     ifstr(i) $(KeyExtraParams) != $(KeyNull)
  1438.         EnumRegValue $(KeyExtraParams) ExtraValueList
  1439.         ForListDo $(ExtraValueList)
  1440.             set ValueList = >( $(ValueList), $($) )
  1441.         EndForListDo
  1442.     endif
  1443.  
  1444.     ForListDo $(ValueList)
  1445.         set ValueItem = $($)
  1446.         set ValueName = *($(ValueItem), 1)
  1447.         set ValueData = *($(ValueItem), 4)
  1448.  
  1449.         goto assign_value_$(Option)
  1450.  
  1451.         ;++++++++++++++++++++++++++++++++++++
  1452.         ; 
  1453.         ; assign_value_ECSDLCLS:
  1454.         ;
  1455.         ;++++++++++++++++++++++++++++++++++++
  1456.         assign_value_ECSDLCLS = +
  1457.             
  1458. ;                       ifstr(i)      $(ValueName) == "DriverNumber"
  1459.             ifstr(i)      $(ValueName) == "EcPort"
  1460.                 set DriverNumber = $(ValueData)
  1461.             else-ifstr(i) $(ValueName) == "LineType"
  1462.                 set LineType = $(ValueData)
  1463.             else-ifstr(i) $(ValueName) == "Carrier"
  1464.                 set Carrier = $(ValueData)
  1465.             endif
  1466.             goto finish_assign_value
  1467.  
  1468.         ;++++++++++++++++++++++++++++++++++++
  1469.         ; 
  1470.         ; assign_value_ECSDLCDD:
  1471.         ;
  1472.         ;++++++++++++++++++++++++++++++++++++
  1473. ;               assign_value_ECSDLCDD = +
  1474. ;                       goto finish_assign_value
  1475.  
  1476.         ;++++++++++++++++++++++++++++++++++++
  1477.         ;
  1478.         ; finish_assign_value:
  1479.         ;
  1480.         ;++++++++++++++++++++++++++++++++++++
  1481.         finish_assign_value = +
  1482.     
  1483.     EndForListDo
  1484.  
  1485.     goto assign_extra_$(Option)
  1486.  
  1487.     ;++++++++++++++++++++++++++++++++++++
  1488.     ;
  1489.     ; assign_extra_ECSDLCLS:
  1490.     ;
  1491.     ;++++++++++++++++++++++++++++++++++++
  1492.     assign_extra_ECSDLCLS = +
  1493.         goto finish_assign_extra
  1494.     
  1495.     ;++++++++++++++++++++++++++++++++++++
  1496.     ;
  1497.     ; assign_extra_ECSDLCDD:
  1498.     ;
  1499.     ;++++++++++++++++++++++++++++++++++++
  1500. ;       assign_extra_ECSDLCDD = +
  1501. ;               goto finish_assign_extra
  1502.     
  1503.     ;++++++++++++++++++++++++++++++++++++
  1504.     ;
  1505.     ; finish_assign_extra:
  1506.     ;
  1507.     ;++++++++++++++++++++++++++++++++++++
  1508.     finish_assign_extra = +
  1509.  
  1510.     goto modify_params
  1511.  
  1512. ;++++++++++++++++++++++++++++++++++++
  1513. ;
  1514. ; modify_params:
  1515. ; allow the user to bang away at the parameters until they are happy
  1516. ;
  1517. ;++++++++++++++++++++++++++++++++++++
  1518. modify_params = +
  1519.     
  1520.     set from = modify_params
  1521.  
  1522.     goto modify_params_$(Option)
  1523.  
  1524.     ;++++++++++++++++++++++++++++++++++++
  1525.     ;
  1526.     ; modify_params_ECSDLCLS:
  1527.     ;
  1528.     ;++++++++++++++++++++++++++++++++++++
  1529.     modify_params_ECSDLCLS = +
  1530.  
  1531.         shell "" DoSDLCLSConfig $(ServiceName), +
  1532.                     $(ServiceTitle), +
  1533.                     $(DriverNumber), +
  1534.                     $(LineType), +
  1535.                     $(Carrier)
  1536.         ifint $($ShellCode) != 0
  1537.             goto ShellCodeError
  1538.         endif
  1539.  
  1540.         set Status = $($R0)
  1541.         ifstr(i) $(Status) != STATUS_SUCCESSFUL
  1542.             goto end
  1543.         else
  1544.             set Changes       = $($R1)
  1545.             set ServiceTitle  = $($R2)
  1546.             set DriverNumber  = $($R3)
  1547.             set LineType      = $($R4)
  1548.             set Carrier       = $($R5)
  1549.         endif
  1550.         
  1551.         goto finish_modify_params
  1552.  
  1553.     ;++++++++++++++++++++++++++++++++++++
  1554.     ;
  1555.     ; modify_params_ECSDLCDD:
  1556.     ;
  1557.     ;++++++++++++++++++++++++++++++++++++
  1558. ;       modify_params_ECSDLCDD = +
  1559. ;               goto finish_modify_params
  1560.  
  1561.     ;++++++++++++++++++++++++++++++++++++
  1562.     ;
  1563.     ; finish_modify_params:
  1564.     ;
  1565.     ;++++++++++++++++++++++++++++++++++++
  1566.     finish_modify_params = +
  1567.         goto adjust_params
  1568.  
  1569. ;++++++++++++++++++++++++++++++++++++
  1570. ;
  1571. ; adjust_params:
  1572. ; if there is an old version, the registry keys and values exist and all we
  1573. ; have to do is modify them.  otherwise, if we're installing from scratch,
  1574. ; we have to create those keys and values.
  1575. ;
  1576. ;++++++++++++++++++++++++++++++++++++
  1577. adjust_params = +
  1578.  
  1579.     ifint $(OldVersionExisted) == $(TRUE)
  1580.         ifstr(i) $(!NTN_InstallMode) == "configure"
  1581.             goto write_params
  1582.         endif
  1583.     endif
  1584.  
  1585. ;++++++++++++++++++++++++++++++++++++
  1586. ;
  1587. ; create_regvals:
  1588. ; create the necessary parts of the registry
  1589. ;
  1590. ;++++++++++++++++++++++++++++++++++++
  1591. create_regvals = +
  1592.  
  1593.     Shell $(UtilityInf) +
  1594.           CreateSNAService, +
  1595.         $(ServiceName), +
  1596.         $(SNAServiceType), +
  1597.         $(ProductImagePath), +
  1598.         $(ProductDepends), +
  1599.         $(ProductParams), +
  1600.         $(ProductExtraParams), +
  1601.         $(!SNARootDir)"\System\"$(ProductImagePath), +
  1602.         7
  1603.  
  1604.     ifint $($ShellCode) != 0
  1605.         goto ShellCodeError
  1606.     endif
  1607.  
  1608.     set Status              = $($R0)
  1609.     set KeyService          = $($R1)
  1610.     set KeyParameters       = $($R2)
  1611.     set KeyExtraParams      = $($R3)
  1612.  
  1613.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  1614.         CloseRegKey $(KeyService)
  1615.         CloseRegKey $(KeyParameters)
  1616.         CloseRegKey $(KeyExtraParams)
  1617.         set ErrMesg = "Can't Create Service Entry For Instance."
  1618.         set ErrProc = "create_regvals"
  1619.         set ErrFunc = "CreateSNAService"
  1620.         goto fatal_registry
  1621.     endif
  1622.  
  1623.     Shell $(UtilityInf) CreateSNARegEntry, $(ProductRegBase), +
  1624.                            $(ProductFullName)
  1625.     ifint $($ShellCode) != 0
  1626.         goto ShellCodeError
  1627.     endif
  1628.  
  1629.     set Status              = $($R0)
  1630.     set KeyProductBase      = $($R1)
  1631.     set KeyProduct          = $($R2)
  1632.     set KeyServiceIndex     = $($R3)
  1633.     set KeyNetRules         = $($R4)
  1634.  
  1635.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  1636.         CloseRegKey $(KeyProductBase)
  1637.         CloseRegKey $(KeyProduct)
  1638.         CloseRegKey $(KeyServiceIndex)
  1639.         CloseRegKey $(KeyNetRules)
  1640.         set ErrMesg = "Can't Create Product Entry For Instance."
  1641.         set ErrProc = "create_regvals"
  1642.         set ErrFunc = "CreateSNARegEntry"
  1643.         goto fatal_registry
  1644.     endif
  1645.  
  1646.     shell $(UtilityInf) AddValueList, $(KeyServiceIndex), +
  1647.         {   { ServiceName , $(NoTitle), $(!REG_VT_SZ), $(ServiceName)  }, +
  1648.         { InfName     , $(NoTitle), $(!REG_VT_SZ), $(FullInfName)  }, +
  1649.         { SoftwareType, $(NoTitle), $(!REG_VT_SZ), $(SoftwareType) }, +
  1650.         { SNAVersion  , $(NoTitle), $(!REG_VT_SZ), $(!SNAVersion)  } }
  1651.  
  1652.     set NROption    = $(Option)"_"$(Instance)
  1653.     set NRTitle     = $(NetRulesTitle)
  1654.     set NRClass     = { $(NetRulesClass) }
  1655.     set NRBindForm  = $(ServiceName)" yes yes container"
  1656.     set NRUse       = $(NetRulesUse)
  1657.     set NRBindable  = { $(NetRulesBindable) }
  1658.     set NetRulesValues = { +
  1659.         { InfName    , $(NoTitle), $(!REG_VT_SZ),       $(FullInfName)  }, +
  1660.         { InfOption  , $(NoTitle), $(!REG_VT_SZ),       $(NROption)     }, +
  1661.         { title      , $(NoTitle), $(!REG_VT_SZ),       $(NRTitle)      }, +
  1662.         { use        , $(NoTitle), $(!REG_VT_SZ),       $(NRuse)        }, +
  1663.         { bindform   , $(NoTitle), $(!REG_VT_SZ),       $(NRBindForm)   }, +
  1664.         { class      , $(NoTitle), $(!REG_VT_MULTI_SZ), $(NRClass)      }, +
  1665.         { type       , $(NoTitle), $(!REG_VT_SZ),       $(NetRulesType) }, +
  1666.         { bindable   , $(NoTitle), $(!REG_VT_MULTI_SZ), $(NRBindable)   }  +
  1667.                  }
  1668.  
  1669.     shell $(UtilityInf) AddValueList $(KeyNetRules) $(NetRulesValues)
  1670.  
  1671.     ifint $(ProductExists) == $(FALSE)
  1672.         read-syms ProgressCopyVars
  1673.         install InstallRemove
  1674.     endif
  1675.  
  1676.     goto write_params
  1677.  
  1678. ;++++++++++++++++++++++++++++++++++++
  1679. ;
  1680. ; write_params:
  1681. ;
  1682. ;++++++++++++++++++++++++++++++++++++
  1683. write_params = +
  1684.  
  1685.     ifstr $(KeyProductBase) == $(KeyNull)
  1686.         shell $(UtilityInf) FindSNARegEntry, +
  1687.                     $(ProductRegBase), +
  1688.                     $(ProductFullName)
  1689.  
  1690.         ifint $($ShellCode) != 0
  1691.             goto ShellCodeError
  1692.         endif
  1693.  
  1694.         set Status          = $($R0)
  1695.         set KeyProductBase  = $($R1)
  1696.         set KeyProduct      = $($R2)
  1697.         set KeyServiceIndex = $($R3)
  1698.         set KeyNetRules     = $($R4)
  1699.  
  1700.         ifstr(i) $(Status) != STATUS_SUCCESSFUL
  1701.             CloseRegKey $(KeyProductBase)
  1702.             CloseRegKey $(KeyProduct)
  1703.             CloseRegKey $(KeyServiceIndex)
  1704.             CloseRegKey $(KeyNetRules)
  1705.             set ErrMesg = "Can't Find Product Entry For Instance."
  1706.             set ErrProc = "write_params"
  1707.             set ErrFunc = "FindSNARegEntry"
  1708.             goto fatal_registry
  1709.         endif
  1710.     endif
  1711.  
  1712.     ifstr $(KeyService) == $(KeyNull)
  1713.         shell $(UtilityInf) FindSNAService, $(ServiceName)
  1714.         ifint $($ShellCode) != 0
  1715.             goto ShellCodeError
  1716.         endif
  1717.  
  1718.         set Status              = $($R0)
  1719.         set KeyService          = $($R1)
  1720.         set KeyParameters       = $($R2)
  1721.         set KeyExtraParams      = $($R3)
  1722.  
  1723.         ifstr(i) $(Status) != STATUS_SUCCESSFUL
  1724.             CloseRegKey $(KeyService)
  1725.             CloseRegKey $(KeyParameters)
  1726.             CloseRegKey $(KeyExtraParams)
  1727.             set ErrMesg = "Can't Find Service Entry For Instance."
  1728.             set ErrProc = "write_params"
  1729.             set ErrFunc = "FindSNAService"
  1730.             goto fatal_registry
  1731.         endif
  1732.     endif
  1733.  
  1734.     goto write_params_$(Option)
  1735.  
  1736.     ;++++++++++++++++++++++++++++++++++++
  1737.     ;
  1738.     ; write_params_ECSDLCLS:
  1739.     ;
  1740.     ;++++++++++++++++++++++++++++++++++++
  1741.     write_params_ECSDLCLS = +
  1742.         set FullOption = $(Option)"_"$(Instance)
  1743.         set ProductParams = { +
  1744.             { IHVDLL       , $(NoTitle), $(!REG_VT_SZ), $(ProductDLL)  },+
  1745.             { InfName      , $(NoTitle), $(!REG_VT_SZ), $(FullInfName) },+
  1746.             { InfOption    , $(NoTitle), $(!REG_VT_SZ), $(FullOption)  },+
  1747.             { DriverName   , $(NoTitle), $(!REG_VT_SZ), ""      } +
  1748.             }
  1749.         set ProductExtraParams = { +    
  1750. ;;                      { DriverNumber, $(NoTitle), $(!REG_VT_DWORD), $(DriverNumber) }, +
  1751.             { EcPort      , $(NoTitle), $(!REG_VT_DWORD), $(DriverNumber) }, +
  1752.             { LineType    , $(NoTitle), $(!REG_VT_DWORD), $(LineType) }, +
  1753.             { Carrier     , $(NoTitle), $(!REG_VT_DWORD), $(Carrier)  }  +
  1754.             }
  1755.  
  1756.         goto finish_write_params
  1757.  
  1758.     ;++++++++++++++++++++++++++++++++++++
  1759.     ;
  1760.     ; write_params_ECSDLCDD:
  1761.     ;
  1762.     ;++++++++++++++++++++++++++++++++++++
  1763. ;       write_params_ECSDLCDD = +
  1764. ;               set FullOption    = $(Option)"_"$(Instance)
  1765. ;               set ProductParams = { +
  1766. ;                       { InfName      , $(NoTitle), $(!REG_VT_SZ)   , $(FullInfName)   },+
  1767. ;                       { InfOption    , $(NoTitle), $(!REG_VT_SZ)   , $(FullOption)    } +
  1768. ;                       }
  1769. ;               set ProductExtraParams = {}
  1770. ;               goto finish_write_params
  1771.  
  1772.     ;++++++++++++++++++++++++++++++++++++
  1773.     ;
  1774.     ; finish_write_params:
  1775.     ;
  1776.     ;++++++++++++++++++++++++++++++++++++
  1777.     finish_write_params = +
  1778.  
  1779.         shell $(UtilityInf) AddValueList, $(KeyServiceIndex), +
  1780.             { +
  1781.             { Title      , $(NoTitle), $(!REG_VT_SZ), $(ServiceTitle) }, +
  1782.             { Description, $(NoTitle), $(!REG_VT_SZ), $(ServiceDesc)  } +
  1783.             }
  1784.         ifint $($ShellCode) != 0
  1785.             goto ShellCodeError
  1786.         endif
  1787.  
  1788.         shell $(UtilityInf) AddValueList, $(KeyParameters), +
  1789.             { +
  1790.             { Title      , $(NoTitle), $(!REG_VT_SZ), $(ServiceTitle) }, +
  1791.             { Description, $(NoTitle), $(!REG_VT_SZ), $(ServiceDesc)  } +
  1792.             }
  1793.         ifint $($ShellCode) != 0
  1794.             goto ShellCodeError
  1795.         endif
  1796.  
  1797.         ifstr(i) $(ProductParams) != {}
  1798.             shell $(UtilityInf) AddValueList, $(KeyParameters), +
  1799.                               $(ProductParams)
  1800.             ifint $($ShellCode) != 0
  1801.                 goto ShellCodeError
  1802.             endif
  1803.         endif
  1804.  
  1805.         ifstr(i) $(ProductExtraParams) != {}    
  1806.             shell $(UtilityInf) AddValueList, $(KeyExtraParams), +
  1807.                               $(ProductExtraParams)
  1808.             ifint $($ShellCode) != 0
  1809.                 goto ShellCodeError
  1810.             endif
  1811.         endif
  1812.     
  1813.         set RetData = >( $(RetData), { $(Instance), +
  1814.                            $(ServiceName), +
  1815.                            $(ServiceTitle), +
  1816.                            $(ServiceDesc), +
  1817.                            $(!NTN_InstallMode), +
  1818.                          } )
  1819.  
  1820.         CloseRegKey $(KeyProductBase)
  1821.         CloseRegKey $(KeyProduct)
  1822.         CloseRegKey $(KeyServiceIndex)
  1823.         CloseRegKey $(KeyNetRules)
  1824.         CloseRegKey $(KeyService)
  1825.         CloseRegKey $(KeyParameters)
  1826.         CloseRegKey $(KeyExtraParams)
  1827.  
  1828.         goto successful
  1829.  
  1830. ;++++++++++++++++++++++++++++++++++++
  1831. ;
  1832. ; getbind_component:
  1833. ;
  1834. ;++++++++++++++++++++++++++++++++++++
  1835. getbind_component = +
  1836.     goto getbind_$(Option)
  1837.  
  1838.     ;++++++++++++++++++++++++++++++++++++
  1839.     ;
  1840.     ; getbind_ECSDLCLS:
  1841.     ;
  1842.     ;++++++++++++++++++++++++++++++++++++
  1843.     getbind_ECSDLCLS = +
  1844. ;               set RetData = { {"01", "ECSDLCDD", "", "", "getbindings"} }
  1845.         goto finish_getbind_component
  1846.  
  1847.     ;++++++++++++++++++++++++++++++++++++
  1848.     ;
  1849.     ; getbind_ECSDLCDD:
  1850.     ;
  1851.     ;++++++++++++++++++++++++++++++++++++
  1852. ;       getbind_ECSDLCDD = +
  1853. ;               goto finish_getbind_component
  1854.  
  1855.     ;++++++++++++++++++++++++++++++++++++
  1856.     ;
  1857.     ; finish_getbind_component:
  1858.     ;
  1859.     ;++++++++++++++++++++++++++++++++++++
  1860.     finish_getbind_component = +
  1861.         goto successful
  1862.  
  1863. ;++++++++++++++++++++++++++++++++++++
  1864. ;
  1865. ; bind_component:
  1866. ;
  1867. ;++++++++++++++++++++++++++++++++++++
  1868. bind_component = +
  1869.  
  1870.     set Error = "Sorry.  No Bindings Feature Yet."  
  1871.     goto fatal_msg
  1872.  
  1873. ;++++++++++++++++++++++++++++++++++++
  1874. ;
  1875. ; remove_component:
  1876. ;
  1877. ;++++++++++++++++++++++++++++++++++++
  1878. remove_component = +
  1879.     read-syms FileConstants$(Option)
  1880.  
  1881.     ;
  1882.     ; we need to set ourselved up with these variables for later use
  1883.     ;
  1884.     shell $(UtilityInf) FindSNAProductServices +
  1885.                 $(ProductRegBase), +
  1886.                 $(ProductFullName)
  1887.     ifint $($ShellCode) != 0
  1888.         goto ShellCodeError
  1889.     endif
  1890.  
  1891.     set Status               = $($R0)
  1892.     set SvcIndexList = $($R1)
  1893.     set SvcNameList  = $($R2)
  1894.     set SvcTitleList = $($R3)
  1895.     set SvcDescList  = $($R4)
  1896.  
  1897.     ifstr(i) $(Status) == STATUS_NOSUCHPRODUCT
  1898.         goto successful
  1899.     endif
  1900.  
  1901.     ifstr(i) $(Status) == STATUS_FAILED
  1902.         set ErrMesg = "Can't Open Product Entry In Registry."
  1903.         set ErrProc = "remove_component"
  1904.         set ErrFunc = "FindSNAProductServices"
  1905.         goto fatal_registry
  1906.     endif
  1907.  
  1908.     ;
  1909.     ; This will be a counter that will be used to decide whether or not
  1910.     ; the product key should be removed at the end
  1911.     ;
  1912.     QueryListSize SvcIndexListSize $(SvcIndexList)
  1913.  
  1914.     ifstr(i) $(!NTN_InstallMode) == "fullremove"
  1915.         set RemoveMode = "Full"
  1916.         goto remove_all_pieces
  1917.     endif
  1918.  
  1919.     set RemoveMode = "Partial"
  1920.  
  1921.     ifstr(i) $(!NTN_InstallMode) == "snaremove"
  1922.         ; Hack.  Here we search for bindings and remove only if nothing
  1923.         ; else needs this piece.
  1924. ;               ifstr(i) $(Option) == "ECSDLCDD"
  1925. ;                       set PN = #( FileConstantsECSDLCLS, ProductName, 1)
  1926. ;                       set PV = #( FileConstantsECSDLCLS, ProductVersion, 1)
  1927. ;                       shell $(UtilityInf) FindSNAProductServices $(ProductRegBase) +
  1928. ;                                                                  $(PN)"_"$(PV)
  1929. ;                       set _Status = $($R0)
  1930. ;                       set _List   = $($R1)
  1931. ;
  1932. ;                       ifstr(i) $(_List) != {}
  1933. ;                               goto successful
  1934. ;                       endif
  1935. ;                       shell $(UtilityInf) FindSNAProductServices $(ProductRegBase) +
  1936. ;                                                                  "ECX25LS_1.0"
  1937. ;                       set _Status = $($R0)
  1938. ;                       set _List   = $($R1)
  1939. ;                       ifstr(i) $(_Status) == STATUS_FAILED
  1940. ;                               goto set_status_failed
  1941. ;                       endif
  1942. ;                       ifstr(i) $(_List) != {}
  1943. ;                               goto successful
  1944. ;                       endif
  1945. ;               endif
  1946.     endif
  1947.  
  1948.     shell $(UtilityInf) GrepUniqueServiceInfo "Index", +
  1949.                            $(Instance), +
  1950.                            $(SvcIndexList), +
  1951.                            $(SvcNameList), +
  1952.                            $(SvcTitleList), +
  1953.                            $(SvcDescList)
  1954.     ifint $($ShellCode) != 0
  1955.         goto ShellCodeError
  1956.     endif
  1957.  
  1958.     set Status      = $($R0)
  1959.     set RemoveIndex = $($R1)
  1960.     set RemoveName  = $($R2)
  1961.     set RemoveTitle = $($R3)
  1962.     set RemoveDesc  = $($R4)
  1963.  
  1964.     goto remove_one_piece
  1965.  
  1966. ;++++++++++++++++++++++++++++++++++++
  1967. ;
  1968. ; remove_all_pieces:
  1969. ;
  1970. ;++++++++++++++++++++++++++++++++++++
  1971. remove_all_pieces = +
  1972.  
  1973.     ForListDo $(SvcIndexList)
  1974.  
  1975.         ifstr(i) $(KeyProductBase) != $(KeyNull)
  1976.             CloseRegKey $(KeyProductBase)
  1977.         endif
  1978.  
  1979.         set RemoveIndex = $($)
  1980.  
  1981.         shell $(UtilityInf) GrepUniqueServiceInfo "Index", +
  1982.                         $(RemoveIndex), +
  1983.                         $(SvcIndexList), +
  1984.                         $(SvcNameList), +
  1985.                         $(SvcTitleList), +
  1986.                         $(SvcDescList)
  1987.         ifint $($ShellCode) != 0
  1988.             goto ShellCodeError
  1989.         endif
  1990.  
  1991.         set Status          = $($R0)
  1992.         set RemoveIndex = $($R1)
  1993.         set RemoveName  = $($R2)
  1994.         set RemoveTitle = $($R3)
  1995.         set RemoveDesc  = $($R4)
  1996.         
  1997.         ifstr(i) $(Status) != STATUS_SUCCESSFUL
  1998.             goto end
  1999.         endif
  2000.  
  2001.         set TInstance = $(Instance)
  2002.         set Instance  = $(RemoveIndex)
  2003.         read-syms FileConstants$(Option)
  2004.         set Instance  = $(TInstance)
  2005.  
  2006.         goto remove_one_piece
  2007.         
  2008.         ;++++++++++++++++++++++++++++++++++++
  2009.         ; 
  2010.         ; remove_next_piece:
  2011.         ;
  2012.         ;++++++++++++++++++++++++++++++++++++
  2013.         remove_next_piece = +
  2014.  
  2015.     EndForListDo
  2016.  
  2017.     goto remove_product
  2018.  
  2019. ;++++++++++++++++++++++++++++++++++++
  2020. ;
  2021. ; remove_one_piece:
  2022. ;
  2023. ;++++++++++++++++++++++++++++++++++++
  2024. remove_one_piece = +
  2025.  
  2026.     shell $(UtilityInf) FindSNARegEntry, $(ProductRegBase), +
  2027.                          $(ProductFullName)
  2028.     ifint $($ShellCode) != 0
  2029.         goto ShellCodeError
  2030.     endif
  2031.  
  2032.     set Status              = $($R0)
  2033.     set KeyProductBase      = $($R1)
  2034.     set KeyProduct          = $($R2)
  2035.     set KeyServiceIndex     = $($R3)
  2036.     set KeyNetRules         = $($R4)
  2037.  
  2038.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  2039.         CloseRegKey $(KeyProductBase)
  2040.         CloseRegKey $(KeyProduct)
  2041.         CloseRegKey $(KeyProductVer)
  2042.         CloseRegKey $(KeyNetRules)
  2043.         set ErrMesg = "Can't Find Product Entry For Instance."
  2044.         set ErrProc = "remove_one_piece"
  2045.         set ErrFunc = "FindSNARegEntry"
  2046.         goto fatal_registry
  2047.     endif
  2048.  
  2049.     ;
  2050.     ; Get rid of this service instance in the product keys
  2051.     ;
  2052.     CloseRegKey $(KeyServiceIndex)
  2053.     CloseRegKey $(KeyNetRules)
  2054.     DeleteRegTree $(KeyProduct) $(RemoveIndex)
  2055.     CloseRegKey $(KeyProduct)
  2056.  
  2057.     shell $(UtilityInf) DeleteSNAService $(RemoveName)
  2058.  
  2059.     set-sub SvcIndexListSize = $(SvcIndexListSize), 1
  2060.  
  2061.     OpenRegKey $(!REG_H_LOCAL), "", $(ProductRegBase), +
  2062.            $(!REG_KEY_READWRITE), KeyProductTemp
  2063.     ifstr(i) $(KeyProductTemp) != ""
  2064.       DeleteRegTree $(KeyProductTemp) $(ProductFullName)
  2065.       CloseRegKey $(KeyProductTemp)
  2066.     endif
  2067.  
  2068.     ;
  2069.     ; Delete the EventLog entry for the device driver.
  2070.     ;
  2071. ;       OpenRegKey $(!REG_H_LOCAL), "", +
  2072. ;                  "System\CurrentControlSet\Services\EventLog\System", +
  2073. ;                  $(!REG_KEY_READWRITE), KeyProduct
  2074.  
  2075. ;       ifstr(i) $(!NTN_InstallMode) == "fullremove"
  2076. ;         ifstr(i) $(KeyProduct) != $(KeyNull)
  2077. ;           DeleteRegTree $(KeyProduct), "ECSYNC"
  2078. ;         endif
  2079. ;       endif
  2080.  
  2081. ;       CloseRegKey $(KeyProduct)
  2082.  
  2083.     ifstr(i) $(!NTN_InstallMode) == "fullremove"
  2084.       install InstallRemove
  2085.     endif
  2086.  
  2087.     set RetData = >( $(RetData), { $(RemoveIndex), +
  2088.                     $(RemoveName), +
  2089.                     $(RemoveTitle), +
  2090.                     $(RemoveDesc), +
  2091.                     $(!NTN_InstallMode), +
  2092.                     } )
  2093.  
  2094.     ifstr(i) $(RemoveMode) == "Full"
  2095.         goto remove_next_piece
  2096.     endif
  2097.  
  2098. ;++++++++++++++++++++++++++++++++++++
  2099. ;
  2100. ; remove_product:
  2101. ;
  2102. ;++++++++++++++++++++++++++++++++++++
  2103. remove_product = +
  2104.     goto finish_remove_component
  2105.  
  2106. ;++++++++++++++++++++++++++++++++++++
  2107. ;
  2108. ; finish_remove_component:
  2109. ;
  2110. ;++++++++++++++++++++++++++++++++++++
  2111. finish_remove_component = +
  2112.     goto successful
  2113.  
  2114.  
  2115. ;++++++++++++++++++++++++++++++++++++
  2116. ;++++++++++++++++++++++++++++++++++++
  2117. ;
  2118. ; Escape Hatches:
  2119. ;
  2120. ;++++++++++++++++++++++++++++++++++++
  2121. ;++++++++++++++++++++++++++++++++++++
  2122.  
  2123. ;++++++++++++++++++++++++++++++++++++
  2124. ;
  2125. ; successful:
  2126. ; this part actually copies the files if the DoCopy variable is on
  2127. ;
  2128. ;++++++++++++++++++++++++++++++++++++
  2129. successful = +
  2130.     set Status = STATUS_SUCCESSFUL
  2131.     goto end
  2132.  
  2133. ;++++++++++++++++++++++++++++++++++++
  2134. ;
  2135. ; warning_msg:
  2136. ; a warning display
  2137. ;
  2138. ;++++++++++++++++++++++++++++++++++++
  2139. warning_msg = +
  2140.  
  2141.     ; TODO: This is how the template does warnings.  Do we have a better way?
  2142.     ;       Do we want to do it differently?
  2143.     ;       CODENAME: WARNINGS
  2144.     
  2145.     Shell $(SubroutineInf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  2146.     ifint $($ShellCode) != 0
  2147.         goto ShellCodeError
  2148.     endif
  2149.     
  2150.     set DLGEVENT = $($R1)
  2151.  
  2152.     ifstr(i) $(DLGEVENT) == "OK"
  2153.         goto $(to)
  2154.     else-ifstr(i) $(DLGEVENT) == "CANCEL"
  2155.         goto $(from)
  2156.     else
  2157.     set Status = STATUS_FAILED
  2158.         goto end
  2159.     endif
  2160.  
  2161. ;++++++++++++++++++++++++++++++++++++
  2162. ;
  2163. ; nonfatal_msg:
  2164. ; a non-fatal display
  2165. ;
  2166. ;++++++++++++++++++++++++++++++++++++
  2167. nonfatal_msg = +
  2168.  
  2169.     ; TODO: See CODENAME: WARNINGS
  2170.  
  2171.     Shell $(SubroutineInf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  2172.     ifint $($ShellCode) != 0
  2173.         goto ShellCodeError
  2174.     endif
  2175.  
  2176.     set DLGEVENT = $($R1)
  2177.  
  2178.     ifstr(i) $(DLGEVENT) == "OK"
  2179.     goto $(from)
  2180.     else
  2181.     goto "end"
  2182.     endif
  2183.  
  2184. ;++++++++++++++++++++++++++++++++++++
  2185. ;
  2186. ; fatal_registry:
  2187. ; something failed in the registry access
  2188. ;
  2189. ;++++++++++++++++++++++++++++++++++++
  2190. fatal_registry = +
  2191.  
  2192.     set Error = +
  2193.         "Fatal Registry Error:"$(!LF)+
  2194.         $(ErrMesg)$(!LF)+
  2195.         "File: "$(ThisInf)$(!LF)+
  2196.         "Procedure: "$(ErrProc)$(!LF)+
  2197.         "Function: "$(ErrFunc)
  2198.  
  2199.     goto fatal_msg
  2200.  
  2201. ;++++++++++++++++++++++++++++++++++++
  2202. ;
  2203. ; fatal_msg:
  2204. ; a fatal error display
  2205. ;
  2206. ;++++++++++++++++++++++++++++++++++++
  2207. fatal_msg =     +
  2208.  
  2209.     ; TODO: See CODENAME: WARNINGS
  2210.  
  2211.     Shell $(SubroutineInf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  2212.     ifint $($ShellCode) != 0
  2213.         goto ShellCodeError
  2214.     endif
  2215.  
  2216.     goto set_status_failed
  2217.  
  2218. ;++++++++++++++++++++++++++++++++++++
  2219. ;
  2220. ; ShellCodeError:
  2221. ; a shell error to be displayed
  2222. ;++++++++++++++++++++++++++++++++++++
  2223. ShellCodeError = +
  2224.  
  2225.     ; TODO: See CODENAME: WARNINGS
  2226.  
  2227.     set DlgType      = "MessageBox"
  2228.     set STF_MB_TITLE = "Error: "$(SetupTitle)
  2229.     set STF_MB_TEXT  = "Shell Code Error"
  2230.     set STF_MB_TYPE  = 1
  2231.     set STF_MB_ICON  = 3
  2232.     set STF_MB_DEF   = 1
  2233.     ui start "Error Message"
  2234.     goto set_status_failed
  2235.  
  2236. ;++++++++++++++++++++++++++++++++++++
  2237. ;
  2238. ; set_status_failed:
  2239. ; last step before exiting
  2240. ;
  2241. ;++++++++++++++++++++++++++++++++++++
  2242. set_status_failed = +
  2243.  
  2244.     set Status = STATUS_FAILED
  2245.     goto end
  2246.  
  2247. ;++++++++++++++++++++++++++++++++++++
  2248. ;
  2249. ; end:
  2250. ; this exit point sets the CommonStatus to the current status 
  2251. ; then returns the status and return data
  2252. ;
  2253. ;++++++++++++++++++++++++++++++++++++
  2254. end = +
  2255.     ifstr(i) $(!IHVDLGHANDLE) != ""
  2256.         FreeLibrary $(!IHVDLGHANDLE)
  2257.         set !IHVDLGHANDLE = ""
  2258.     endif
  2259.     set CommonStatus = $(Status)
  2260.     Return $(CommonStatus) $(RetData) $(Changes)
  2261.  
  2262. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2263. ;
  2264. ; INSTALLATION AND FILE SECTION
  2265. ; -----------------------------
  2266. ; This section is responsible for installing the component and listing all
  2267. ; the necessary files etc.
  2268. ;
  2269. ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2270.  
  2271. ;========================================================================
  2272. ;
  2273. ; INSTALL
  2274. ; -------
  2275. ; The IHV should follow the following template for this section.  It is
  2276. ; responsible for file copying and registry initialization.
  2277. ;
  2278. ;========================================================================
  2279.  
  2280. [InstallRemove]
  2281.  
  2282.     set SNADirList  = { "hwsetup", "system" }
  2283.     set SNAToList   = { "system\hwsetup", "system" }
  2284.  
  2285.     ifstr(i) $(!NTN_InstallMode) == "install"
  2286.         ifstr(i) $(!AddCopy) == "YES"
  2287.             ForListDo $(SNADirList)
  2288.                 ifstr(i) $($) != "hwsetup"
  2289.                     set Ext = $(ThisFile)
  2290.                 else
  2291.                     set Ext = ""
  2292.                 endif
  2293.                 set To = *( $(SNAToList), $(#) )
  2294.                 AddSectionFilesToCopyList "FilesFor_"$($)"_"$(Option) +
  2295.                                           $(!DriverDir)$(Ext), +
  2296.                                           $(!SNARootDir)"\"$(To)
  2297.             EndForListDo
  2298.             CreateDir $(!SNARootDir)"\system\hwsetup\ecsdlc"
  2299.             AddSectionFilesToCopyList "FilesFor_system_"$(Option) +
  2300.                           $(!DriverDir)$(Ext), +
  2301.                           $(!SNARootDir)"\system\hwsetup\ecsdlc"
  2302.         else
  2303.             AddSectionFilesToCopyList "FilesFor_system_"$(Option) +
  2304.                           $(!DriverDir)"ecsdlc\"$(Ext), +
  2305.                           $(!SNARootDir)"\system"
  2306.             CopyFilesInCopyList
  2307.         endif
  2308.     
  2309.         ifstr(i) $(!DoCopy) == "YES"
  2310.             CopyFilesInCopyList
  2311.         endif
  2312.     else
  2313.         set !_FileRemoveList = {}
  2314.         ForListDo $(SNADirList)
  2315.             set SNADir   = *( $(SNAToList), $(#) )
  2316.             set FullPath = $(!SNARootDir)"\"$(SNADir)
  2317.             set FileList = ^( "FilesFor_"$($)"_"$(Option), 2 )
  2318.             ForListDo $(FileList)
  2319.                 set !_FileRemoveList = >( $(!_FileRemoveList), +
  2320.                                            $(FullPath)"\"$($) ) 
  2321.             EndForListDo
  2322.         EndForListDo
  2323.     endif
  2324.         
  2325.     exit
  2326.  
  2327. ;========================================================================
  2328. ;
  2329. ; FILES
  2330. ; -----
  2331. ; These should list the files to be installed for each particular option.
  2332. ;
  2333. ; FORMAT:
  2334. ; The format is "FilesFor_" concatenated with the directory where they will
  2335. ;   end up, another underscore, and the option whose files these are.
  2336. ;   Currently, directories that can take files are:
  2337. ;     hwsetup - the inf file, its help and libraries
  2338. ;     ntbin  - executables
  2339. ;     ntsys  - system files
  2340. ; The format includes an enumeration constant and a name for each file, as well
  2341. ; as a number of possible flags
  2342. ;       1,              file1.spu
  2343. ;       1,              file2.spu
  2344. ;       ...
  2345. ;
  2346. ;========================================================================
  2347.  
  2348. [FilesFor_hwsetup_ECSDLCLS]
  2349. 1,      ecsdlc.inf
  2350. 1,      ecsdlc.hlp
  2351. 1,      ecsdlc.srl
  2352.  
  2353. [FilesFor_system_ECSDLCLS]
  2354. 1,      ecsdlc.dll
  2355.  
  2356. ;[FilesFor_system_ECSDLCDD]
  2357. ;1,     ecsync.sys
  2358.