home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 February / VPR9602A.ISO / drvlib / protocol / tp4setup / alpha / oemsetup.inf < prev    next >
INI File  |  1995-10-27  |  34KB  |  955 lines

  1. ; The naming convention used by NT for repective types of installation
  2. ; done using INF script files, is as follows:
  3. ;   oemNAD**.inf network adapter card and  driver
  4. ;   oemnxp**.inf network transport
  5. ;
  6. ; Thus ATI's OSI LAN INF file will be called oemnxptp4.inf in NT machine
  7. ; But on the distribution media it is called oemsetup.inf file
  8. ;
  9. ; 4 sections in INF file are a must. They are called "detect Sections"
  10. ; Namely: Identify, ReturnOptions, InstallOption, Source Media Description
  11. ; Begin INF QUERYING SECTION
  12. ;
  13. ; For INF file to be discovered automatically by NCPA/SETUP program
  14. ; it must have following 2 sections: Identify and ReturnOptions
  15. ;
  16. ; Identify section has
  17. ;   Input: none,
  18. ;   Output:STATUS_SUCCESS,Option(NetAdapter etc.),Distribution media
  19. ;
  20. ;
  21. [Source Media Descriptions]
  22. ; TAGFILE name presence indicates to Setup that correct disk is inserted
  23. ; Thus in the distribution diskette, ATI must have a file called "disk1"
  24.    1 = "ISO TP4/CLNP Driver Disk #1", TAGFILE = disk1
  25. [Identify]
  26.    set OptionType = NetTransport    ; This definition is a must
  27.    set Status     = STATUS_SUCCESSFUL
  28.    set Media      = #("Source Media Descriptions",1,1)
  29.    Return $(Status) $(OptionType) $(Media)
  30. ;
  31. [LanguagesSupported]
  32.    ENG
  33. [Options]
  34.    ISOTP
  35. [OptionsTextENG]
  36.    ISOTP = "ISO TP4/CLNP Stack"
  37. ; ReturnOptions Sections has
  38. ;   Input: Language Used (ENG|FRN|..)
  39. ;   Output: STATUS,OptionsList(Names of options),OptionTextList(display_names)
  40. [ReturnOptions]
  41.   set Status         = STATUS_FAILED
  42.   set OptionList     = {}
  43.   set OptionTextList = {}
  44. ;
  45.   set LanguageList   = ^(LanguagesSupported,1)
  46.   Ifcontains(i) $($0) in $(LanguageList)
  47.      goto Set_ReturnOptions
  48.   else
  49.      Status = STATUS_NOLANGUAGE
  50.      goto Finish_ReturnOptions
  51.   endif
  52. ;
  53. Set_ReturnOptions = +
  54.      set OptionList = ^(Options,1)
  55.      set OptionTextList = ^(OptionsText$($0),1) ;get list from OptionTextENG
  56.      set Status = STATUS_SUCCESSFUL
  57.      ;
  58. Finish_ReturnOptions = +
  59.      Return $(Status) $(OptionList) $(OptionTextList)
  60. ;
  61. ;  END INF QUERYING SECTION
  62. ;
  63. ;  BEGINE INF Invocations
  64. ;
  65. ; Constants used throughout
  66. ;
  67. [GenericConstants]
  68.    UtilityInf     = "UTILITY.INF"
  69.    SubroutinInf   = "SUBROUTN.INF"
  70.    SoftwareType   = transport
  71.    ExitCode       = 0
  72.    BillboardVisible = 0
  73.    from = ""
  74.    to   = ""
  75.    ExitCodeOK     = 0
  76.    ExitCodeCancel = 1
  77.    ExitCodeFatal  = 2
  78.  
  79.    ExitState   =  "Active"
  80.  
  81.    KeyNull            = ""
  82.    KeyProduct         = ""
  83.    KeyParameters      = ""
  84.    NoTitle            = 0
  85.  
  86.    TRUE           = 1
  87.    FALSE          = 0
  88.  
  89.    RegistryErrorIndex = NO_ERROR
  90.    MAXIMUM_ALLOWED    = 33554432
  91.    SERVICE_NO_CHANGE  = 4294967295
  92.  
  93.    OldVersionExisted  = $(FALSE)
  94.    DriverPath         = $(!STF_NTPATH)\drivers
  95. ;
  96. ; OSI Transport Stack Specific
  97. ;
  98. [SpecificConstants]
  99.    Manufacturer = "Microsoft"
  100.    ProductMajorVersion = "3"
  101.    ProductMinorVersion = "00"
  102.    ProductVersion    = $(ProductMajorVersion)"."$(ProductMinorVersion)
  103. ;
  104. ; ATI may have to write it's own dll program to capture events and log
  105. ;
  106. ;   NetEventDLL = "%SystemRoot%\System32\tpnetevent.dll"
  107. ;   loLogMsgDLL = "%SystemRoot%\system32\tpLogMsg.dll"
  108. ;
  109. ; Registration Database specific section
  110. ; 2 sections for info about product must be created
  111. ;       1) Software
  112. ;       2) Services : This area is recoverable "last known good config"
  113. ;
  114. ; For Network Software components's Registry area, values are under both
  115. ;       1a) mainRegistryKey(CurrentVersion) and
  116. ;       1b) NetRules Key for network components
  117. ; The presence of a NetRules key indicates that the component is a part
  118. ; of network software
  119. ;
  120. ;
  121. ; Following are values to keys in Software\Miscrosoft\IsoTp\CurrentVersion
  122. ;
  123.    ProductISOTPImagePath  = "%SystemRoot%\system32\plumbing.exe"
  124.    ProductISOTPName  = "IsoTp" ; Must be same as CurrentControlSet\Services
  125.    ProductISOTPSvcType = "serviceauto"  ; Since OWN_WIN32_PROCESS
  126. ;
  127. ; Following are defines for Key Services\tp4sys\Parameters\WinSock
  128. ;
  129.    ProductISOTPWshDllPath      = "%SystemRoot%\System32\wshisotp.dll"
  130.    Sockmaxlength         = 72
  131.    Sockminlength         = 72
  132.  
  133. ;  Mapping Parameter value is calculated by making a calll to Wshisotp dll
  134. ;  It returns a binary string which is the value of subkey "Mapping"
  135. ;
  136. ; Following are NetRule key specific defines
  137. ; BindForm ObjectName, yes|no, yes|no, {container|simple|streams}
  138. ;                     read page 4-20 of pgm guide DDK
  139.    NetRuleISOTPBindForm = """IsoTp"" yes yes container"
  140. ; UniquClass Name, Any parent
  141.    NetRuleISOTPClass    = "IsoTpTransport basic yes"
  142. ; Service classname lowerclass
  143.    NetRuleISOTPType     = "IsoTp IsoTpTransport streamsStack"
  144.    NetRuleISOTPUse      = $(SoftwareType)" yes yes"
  145.  
  146. ;
  147. ; Following are defines for entry into Services\IsoTpsys
  148. ;
  149.    ProductISOTPSYSName     = "IsoTpsys"
  150.    ProductISOTPSYSImagePath    = "\SystemRoot\System32\drivers\IsoTp.sys"
  151.    ProductISOTPSYSSvcType = "kernel"
  152. ;
  153. ;
  154.    ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  155.    LinkageKeyName = $(!NTN_ServiceBase)"\IsoTp\Linkage"
  156.    ServiceISOTPKeyName = $(!NTN_ServiceBase)"\IsoTp"
  157.    ServiceKeyName = $(!NTN_ServiceBase)
  158.  
  159.  
  160. ;
  161. [date]
  162.    Now = {} ? $(!LIBHANDLE) GetSystemDate
  163. ;
  164. ; Installoption section is invoked as follows:
  165. ;    Input: Language, Option Name to install, Source dir path,
  166. ;            AddCopy(Y|N), DoCopy(Y|N), DoConfig(Y|N)
  167. ;    Output: STATUS_SUCCESS|FAILED etc.
  168. ;
  169. ;*** DoConfig value is not used by network INF files ********
  170. ;
  171. [InstallOption]
  172. ;
  173. ; Turn on the debug option for now. But before it goes to the customer
  174. ; tun it if off by setting it to 0 or commenting it out
  175.    set !DebugOutputControl = 1
  176. ;
  177. ; Read in the calling parameters for InstallOption as described above
  178.    set Language = $($0)
  179.    set Option   = $($1)
  180.    set SrcDir   = $($2)
  181.    set AddCopy  = $($3)
  182.    set DoCopy   = $($4)
  183.    set DoConfig = $($5)
  184. ;
  185. ; Check if the chosen Lanaguage is supported or not
  186.    set LangList = ^(LanguagesSupported,1)
  187.    ifcontains(i) $(Language) not-in $(LangList)
  188.       Return STATUS_NOLANGUAGE
  189.    endif
  190. ;
  191. ; Debug-Output some standard SETUP information varibales
  192. ;
  193.    Debug-Output "Executing InstallOptions Section"
  194.    Debug-Output "OEMNXPTP.INF"
  195.    Debug-Output "       Path to media:"$(!STF_SRCDIR)
  196.    Debug-Output "       SYSTEM32 Dir :"$(!STF_WINDOWSSYSPATH) ;\winnt\system32
  197.    Debug-Output "       SYSTEM32 Dir :"$(!STF_NTPATH)         ;\winnt\system32
  198.    Debug-Output "       Install Mode :"$(!STF_INSTALL_MODE)   ;CUSTOM
  199.    Debug-Output "       Option       :"$(Option)              ;ISOTP
  200. ;
  201. ; Get the local variables
  202. ;
  203.    Debug-Output "Reading GenenicConstants Section"
  204.    read-syms GenericConstants
  205.    Debug-Output "Reading SpecificConstants Section"
  206.    read-syms SpecificConstants
  207.    Debug-Output "Reading DialogueConstantsENG Section"
  208.    read-syms DialogueConstants$(!STF_LANGUAGE)
  209.    ifstr(i) $(!NTN_Origination) == "NCPA"
  210.        set continue = $(OK)
  211.    endif
  212.    Debug-Output "Reading FileConstantsENG"
  213.    read-syms FileConstants$(!STF_LANGUAGE)
  214.    detect date
  215.    set-title $(FunctionTitle)
  216.    set to = Begin
  217.    set from = Begin
  218.    set CommonStatus = STATUS_SUCCESSFUL
  219.    EndWait ; show Mouse ptr instead of hourglass
  220.  
  221. Begin = +
  222.    Debug-Output "Executing Begin Label"
  223.    ifstr(i) $(!NTN_InstallMode) == deinstall
  224.       set StartLabel = DeInstallSW
  225.       set OEM_ABANDON_OPTIONS = { $(ProductISOTPSYSName)}
  226.       set OEM_ABANDON_SOFTWARE = { $(ProductISOTPName),"Streams"}
  227.  
  228.    else-ifstr(i) $(!NTN_InstallMode) == Update
  229.       set StartLabel =  UpdateSW
  230.  
  231.    else-ifstr(i) $(!NTN_InstallMode) == Bind
  232.       set StartLabel = BindSWtoAdapter
  233.  
  234.    else-ifstr(i) $(!NTN_InstallMode) == Configure
  235.       set StartLabel = ConfigureSW
  236.  
  237.    else
  238.       Debug-Output "Option from NCPA to SETUP script is Install"
  239.       set StartLabel = InstallSW
  240.       set OEM_ABANDON_SOFTWARE = {}
  241.       set OEM_ABANDON_OPTIONS = {}
  242.    endif
  243.    set from = $(fatal)
  244.    set to   = $(fatal)
  245.    goto $(StartLabel)
  246. ;
  247. ;
  248. DeInstallSW = +
  249.    Debug-Output "Executing DeInstall SW Label"
  250.     ForListDo  $(OEM_ABANDON_SOFTWARE)
  251.         Debug-Output "Remove component: "$($)
  252.         ifstr(i) $($) == "Streams"
  253.             Shell $(UtilityInf), RemoveStreams
  254.         else
  255.             Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $($)
  256.         endif
  257.         ifstr(i) $($) == "IsoTp"
  258.             debug-output "RemoveWinsockInfo "$(ProductISOTPName)
  259.             Shell $(UtilityInf), RemoveWinsockInfo, $(ProductISOTPName)
  260.             set RegistryErrorIndex = $($R0)
  261.             Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  262.                 Debug-Output "OEMNXPTP.INF: Registry error: remove Winsock Info."
  263.             Endif
  264.         endif
  265.     EndForListDo
  266.  
  267.     ForListDo  $(OEM_ABANDON_OPTIONS)
  268.         debug-output "Remove component: "$($)
  269.         Set UseSvcctrl = "YES"
  270.         Shell $(UtilityInf), RemoveService, $($), $(UseSvcctrl)
  271.     EndForListDo
  272.     goto end
  273. ;
  274. ;
  275. UpdateSW = +
  276.    Debug-Output "Executing Update SW Label"
  277.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  278.         Ifstr $(KeyProduct) != $(KeyNull)
  279.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  280.             set Version = *($(VersionInfo), 4)
  281.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  282.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  283.                 Debug-Output "ShellCode error"
  284.                 goto ShellCodeError
  285.             endif
  286.             set !UG_Filename = $($R0)
  287.             ifstr(i) $(!UG_Filename) != ""
  288.                 install "Install-Update"
  289.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  290.                     goto fatal
  291.                 endif
  292.             endif
  293.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  294.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  295.             ifint $(Version) != $(ProductVersion)
  296.             endif
  297.             CloseRegKey $(KeyProduct)
  298.         else
  299.             goto fatalregistry
  300.         endif
  301.     goto end
  302. ;
  303. ;  Configure the software
  304. ;
  305. ConfigureSW = +
  306.    Debug-Output "Executing Configure SW Label"
  307.    set FLibraryErrCtl = 1
  308.    LoadLibrary "x" $(!STF_WINDOWSSYSPATH)\TP4CFG.DLL TP4CFGLIB_HANDLE
  309.    LibraryProcedure ResultList, $(TP4CFGLIB_HANDLE) ISOTPDlgBox
  310.    FreeLibrary $(TP4CFGLIB_HANDLE)
  311.    set FLibraryErrCtl = 0
  312.    set Result = *($(ResultList),1)
  313.    ifstr(i) $(Result) == "CHANGE"
  314.      set CommonStatus = STATUS_REBOOT
  315.    else
  316.      set CommonStatus = STATUS_USERCANCEL
  317.    endif
  318.    goto end
  319. ;
  320. ;
  321. ;
  322. BindSWtoAdapter = +
  323.    Debug-Output "Executing Bind SW to an Adapter Label"
  324.    ifstr(i) $(Option) == "ISOTP"
  325.       OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
  326.       GetRegValue $(LinkageKey) "Bind" BindList
  327.  
  328.       ifstr(i) $(BindList) == {}
  329.          Set BindList = ""
  330.       endif
  331.  
  332.       CloseRegKey $(LinkageKey)
  333.  
  334.       ifstr(i) $(BindList) == ""
  335.          debug-output "OEMNXPTP.INF: no binding info; warning user"
  336.          read-syms InfoDlgCantConfigure
  337.          goto infomsg
  338.       endif
  339.  
  340.       set oldVersionExisted = $(TRUE)
  341.       set CardList = ""
  342.       set CardCount = 0
  343.  
  344.       ForListDo *($(BindList),4)
  345.         Split-String $($), "\", BindInfo
  346.         Set CardName = *($(BindInfo),6)
  347.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"*($(BindInfo),6) $(MAXIMUM_ALLOWED) CardServiceKey
  348.  
  349.         ifstr(i) $(CardServiceKey) != ""
  350.            Debug-output "ConfigureSW, CardName= "$(CardName)
  351.            CloseRegKey $(CardServiceKey)
  352.            Set-add CardCount = $(CardCount),1
  353.  
  354.            ifstr $(CardList) == ""
  355.               Set CardList = $(CardName)
  356.            else
  357.               Set CardList = $(CardList)"@"$(CardName)
  358.            endif
  359.  
  360.            OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\"$(CardName)"\Parameters" $(MAXIMUM_ALLOWED) ServiceParamKey
  361.  
  362.            ifstr(i) $(ServiceParamKey) != ""
  363.               debug-output "ConfigureSW: Opened ServiceParamKey"
  364.               CloseRegKey $(ServiceParamkey)
  365.               OpenRegKey $(ServiceParamKey) "" "IsoTp" $(MAXIMUM_ALLOWED) +
  366.                                             ISOTPKey
  367.               ifstr(i) $(ISOTPKey) == ""
  368.                   CreateRegKey $(ServiceParamKey) {"IsoTp",$(NoTitle), +
  369.                                 GenericClass} "" +
  370.                                 $(MAXIMUM_ALLOWED) "" ISOTPKey
  371.               endif
  372.               CloseRegKey $(ISOTPKey)
  373.            endif
  374.  
  375.        endif
  376. SkipSetDefault = +
  377.        Debug-Output "At SkipSetDefaults"
  378.      EndForListDo
  379.      goto ConfigureSW
  380. ;
  381. ;
  382. ; Installtion of the Software Begin
  383. InstallSW = +
  384.    Debug-Output "Executing Install SW Label"
  385.     ifstr(i) $(!NTN_InstallMode) == "install"
  386.         Ifstr(i) $(DoCopy) == "YES"
  387.            Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  388.            Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  389.                Goto ShellCodeError
  390.            Else-Ifstr(i) $($R0) == STATUS_FAILED
  391.                Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  392.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  393.                    goto ShellCodeError
  394.                endif
  395.                set Error = $($R0)
  396.                Goto fatal
  397.            Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  398.                Goto successful
  399.            Endif
  400.            Set SrcDir = $($R1)
  401.         Endif
  402.  
  403.         Debug-Output "OEMNXPTP.INF: installadapter: installing [Install-Option]"
  404.         install "Install-Option"
  405.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  406.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  407.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  408.                goto ShellCodeError
  409.            endif
  410.            set Error = $($R0)
  411.            goto fatal
  412.         endif
  413.  
  414.     endif
  415.  
  416.  
  417.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  418.     Ifstr $(KeyProduct) != $(KeyNull)
  419.         CloseRegKey $(KeyProduct)
  420.         Shell $(UtilityInf), VerExistedDlg, $(Product$(Option)Title),+
  421.             $(ProductVersion)
  422.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  423.             Debug-Output "OEMNXPTP.INF: ShellCode error: cannot get an error string."
  424.             goto ShellCodeError
  425.         endif
  426.         goto end
  427.     endif
  428.     set OEM_ABANDON_ON  = TRUE
  429.     read-syms Billboard1$(!STF_LANGUAGE)
  430.     Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
  431.     Set BillboardVisible = 1
  432.     Set DoIsoTp      = FALSE
  433.     Set DoIsoTpSys   = FALSE
  434.     Set DoIsoTpSvc   = FALSE
  435.     Ifstr(i) $(Option) == ISOTP
  436.         Set DoIsoTp    = TRUE
  437.         Set DoIsoTpSys = TRUE
  438.         Set DoIsoTpSvc = TRUE
  439.         Set DoStreams  = TRUE
  440.     Else
  441.         Debug-Output "OEMNXPTP.INF: Unrecognized option"
  442.     Endif
  443.     StartWait
  444.     ifstr(i) $(DoIsoTp) == TRUE
  445.         Set ThisOption = ISOTP
  446.         Set OEM_ABANDON_SOFTWARE = >($(OEM_ABANDON_SOFTWARE), $(Product$(ThisOption)Name))
  447.         Debug-Output "OEMNXPTP.INF: installing TP4/CLNP."
  448.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer),+
  449.             $(Product$(ThisOption)Name), $(Product$(ThisOption)Name),+
  450.             $(Product$(ThisOption)DisplayName), $(STF_CONTEXTINFNAME),+
  451.             $(Product$(ThisOption)ImagePath),+
  452.             $(Product$(ThisOption)SvcType),+
  453.             "", {"Streams"}, ""
  454.  
  455.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  456.             Debug-Output "OEMNXPTP.INF: ShellCode error, add software component"
  457.             goto ShellCodeError
  458.         endif
  459.         set RegistryErrorIndex = $($R0)
  460.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  461.             EndWait
  462.             Debug-Output "OEMNXPTP.INF: Registry error: add software components"
  463.             CloseRegKey $($R1)
  464.             CloseRegKey $($R2)
  465.             CloseRegKey $($R3)
  466.             CloseRegKey $($R4)
  467.             CloseRegKey $($R5)
  468.             goto fatalregistry
  469.         endif
  470.         Set Tp4VersKeyHandle  = $($R1)
  471.         Set Tp4RulesKeyHandle = $($R2)
  472.         Set Tp4SvcKeyHandle   = $($R3)
  473.         Set Tp4ParmKeyHandle  = $($R4)
  474.         Set Tp4LinkageHandle  = $($R5)
  475.         set NewValueList = { +
  476.           {SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  477.           {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  478.           {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  479.           {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  480.           {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  481.           {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  482.           {Review,$(NoTitle),$(!REG_VT_DWORD),1},+
  483.           {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  484.         Shell  $(UtilityInf), AddValueList, $(Tp4VersKeyHandle), $(NewValueList)
  485.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  486.             Debug-Output "OEMNXPTP.INF: ShellCode error, add value list"
  487.             goto ShellCodeError
  488.         endif
  489.         set RegistryErrorIndex = $($R0)
  490.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  491.             EndWait
  492.             Debug-Output "OEMNXPTP.INF: Registry error: add value list."
  493.             CloseRegKey $(Tp4VersKeyHandle)
  494.             CloseRegKey $(Tp4RulesKeyHandle)
  495.             CloseRegKey $(Tp4SvcKeyHandle)
  496.             CloseRegKey $(Tp4ParmKeyHandle)
  497.             CloseRegkey $(Tp4LinkageHandle)
  498.             goto fatalregistry
  499.         Endif
  500.         set NewValueList = { +
  501.           {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  502.           {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)},+
  503.           {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)},+
  504.           {class,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Class)},+
  505.           {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}}
  506.         Shell  $(UtilityInf), AddValueList, $(Tp4RulesKeyHandle), $(NewValueList)
  507.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  508.             Debug-Output "OEMNXPTP.INF: ShellCode error."
  509.             goto ShellCodeError
  510.         endif
  511.         set RegistryErrorIndex = $($R0)
  512.         CloseRegKey $(Tp4VersKeyHandle)
  513.         CloseRegKey $(Tp4RulesKeyHandle)
  514.         Set NewValueList = { +
  515.            {OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),{"IsoTpsys"}}}
  516.         Shell  $(UtilityInf), AddValueList, $(Tp4LinkageHandle), $(NewValueList)
  517.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  518.             CloseRegKey $(Tp4LinkageHandle)
  519.             CloseRegKey $(Tp4SvcKeyHandle)
  520.             Debug-Output "OEMNXPTP.INF: ShellCode error."
  521.             goto ShellCodeError
  522.         endif
  523.         CloseRegKey $(Tp4LinkageHandle)
  524. ;
  525. ;       Which cards to run OSI on
  526. ;
  527.         set NewValueList = { +
  528.          {Bind,             $(NoTitle),$(REG_VT_SZ),"\Device\Elnk31"}}
  529.  
  530.         Shell  $(UtilityInf), AddValueList, $(Tp4ParmKeyHandle), $(NewValueList)
  531.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  532.             Debug-Output "OEMNXP0.INF: Bind value add ShellCode error."
  533.             CloseRegKey $(Tp4ParmKeyHandle)
  534.             CloseRegKey $(Tp4SvcKeyHandle)
  535.             goto ShellCodeError
  536.         endif
  537.         Set RegistryErrorIndex = $($R0)
  538. ;
  539. ;       TP4, CLNP, ES-IS(ES or IS) Layer specific parmaters
  540. ;
  541. ;
  542. ;       CLNP related parameter
  543. ;
  544.         CreateRegKey $(Tp4ParmKeyHandle) {"CLNP", $(NoTitle), GenericClass} +
  545.                 "" $(MAXIMUM_ALLOWED) "" KeyCLNP
  546.         ifstr(i) $(KeyCLNP) != ""
  547.            set NewValueList = { +
  548.              {LocalMachineName, $(NoTitle),$(!REG_VT_SZ),$(!STF_COMPUTERNAME)},+
  549.              {LocalMachineNSAP, $(NoTitle),$(!REG_VT_SZ),$(!STF_COMPUTERNAME)},+
  550.              {MaxSNSDUSize,     $(NoTitle),$(!REG_VT_DWORD), 1496},+
  551.              {TimerReassembly,  $(NoTitle),$(!REG_VT_DWORD), 10  },+
  552.              {ChecksumUse,      $(NoTitle),$(!REG_VT_DWORD), 0   },+
  553.              {Lifetime,         $(NoTitle),$(!REG_VT_DWORD), 20  }}
  554.  
  555.            Shell  $(UtilityInf), AddValueList, $(KeyCLNP), $(NewValueList)
  556.            CloseRegKey $(KeyCLNP)
  557.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  558.               Debug-Output "OEMNXP0.INF: CLNP value add ShellCode error."
  559.               CloseRegKey $(Tp4ParmKeyHandle)
  560.               CloseRegKey $(Tp4SvcKeyHandle)
  561.               goto ShellCodeError
  562.            endif
  563.            Set RegistryErrorIndex = $($R0)
  564.         endif
  565. ;
  566. ;      ES-IS related parameters
  567. ;
  568.         CreateRegKey $(Tp4ParmKeyHandle) {"ESIS", $(NoTitle), GenericClass} +
  569.                 "" $(MAXIMUM_ALLOWED) "" KeyESIS
  570.         ifstr(i) $(KeyESIS) != ""
  571.            set NewValueList = { +
  572.               {NodeType,            $(NoTitle),$(!REG_VT_SZ),    ES},+
  573.               {ConfigNotify,        $(NoTitle),$(!REG_VT_DWORD), 0 },+
  574.               {GenerateChksum,      $(NoTitle),$(!REG_VT_DWORD), 0 }}
  575.  
  576.  
  577.            Shell  $(UtilityInf), AddValueList, $(KeyESIS), $(NewValueList)
  578.  
  579.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  580.               Debug-Output "OEMNXP0.INF: ESIS value add ShellCode error."
  581.               CloseRegKey $(Tp4ParmKeyHandle)
  582.               CloseRegKey $(Tp4SvcKeyHandle)
  583.               goto ShellCodeError
  584.            endif
  585.            Set RegistryErrorIndex = $($R0)
  586.         endif
  587. ;
  588. ;      IF the Node is configured as an ES
  589. ;
  590.         CreateRegKey $(KeyESIS) {"ES", $(NoTitle), GenericClass} +
  591.                 "" $(MAXIMUM_ALLOWED) "" KeyES
  592.         ifstr(i) $(KeyES) != ""
  593.            set NewValueList = { +
  594.                {TimerConfig,         $(NoTitle),$(!REG_VT_DWORD), 600},+
  595.                {TimerHolding,        $(NoTitle),$(!REG_VT_DWORD), 1800},+
  596.                {RDRefresh,           $(NoTitle),$(!REG_VT_DWORD), 0 },+
  597.                {TimerRDHolding,      $(NoTitle),$(!REG_VT_DWORD), 1800}}
  598.  
  599.            Shell  $(UtilityInf), AddValueList, $(KeyES), $(NewValueList)
  600.            CloseRegKey $(KeyES)
  601.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  602.               Debug-Output "OEMNXP0.INF: ES value add ShellCode error."
  603.               CloseRegKey $(KeyESIS)
  604.               CloseRegKey $(Tp4ParmKeyHandle)
  605.               CloseRegKey $(Tp4SvcKeyHandle)
  606.               goto ShellCodeError
  607.            endif
  608.            Set RegistryErrorIndex = $($R0)
  609.         endif
  610. ;
  611. ;       If the Node is configured as an IS.
  612. ;
  613.         CreateRegKey $(KeyESIS) {"IS", $(NoTitle), GenericClass} +
  614.                 "" $(MAXIMUM_ALLOWED) "" KeyIS
  615.         ifstr(i) $(KeyIS) != ""
  616.            set NewValueList = { +
  617.               {TimerConfig,         $(NoTitle),$(!REG_VT_DWORD), 600},+
  618.               {TimerHolding,        $(NoTitle),$(!REG_VT_DWORD), 1800},+
  619.               {TimerSugESCT,        $(NoTitle),$(!REG_VT_DWORD), 1800}}
  620.  
  621.            Shell  $(UtilityInf), AddValueList, $(KeyIS), $(NewValueList)
  622.            CloseRegKey $(KeyIS)
  623.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  624.               Debug-Output "OEMNXP0.INF: IS value add ShellCode error."
  625.               CloseRegKey $(KeyESIS)
  626.               CloseRegKey $(Tp4ParmKeyHandle)
  627.               CloseRegKey $(Tp4SvcKeyHandle)
  628.               goto ShellCodeError
  629.            endif
  630.            Set RegistryErrorIndex = $($R0)
  631.         endif
  632.         CloseRegKey $($KeyESIS)
  633.  
  634. ;
  635. ;       TP4 related parameters
  636. ;
  637.         CreateRegKey $(Tp4ParmKeyHandle) {"TP4", $(NoTitle), GenericClass} +
  638.                 "" $(MAXIMUM_ALLOWED) "" KeyTP4
  639.         ifstr(i) $(KeyTP4) != ""
  640.            set NewValueList = { +
  641.               {TransmissionCount,   $(NoTitle),$(!REG_VT_DWORD), 6   },+
  642.               {TimerRetransmission, $(NoTitle),$(!REG_VT_DWORD), 20  },+
  643.               {TimerKeepAlive,      $(NoTitle),$(!REG_VT_DWORD), 60  },+
  644.               {TimerInact,          $(NoTitle),$(!REG_VT_DWORD), 180 },+
  645.               {TimerFrozenRef,      $(NoTitle),$(!REG_VT_DWORD), 50  },+
  646. ;
  647. ; TimerTS2 deleted per Sri 5/31
  648. ;             {TimerTS2,            $(NoTitle),$(!REG_VT_DWORD), 20  },+
  649. ;
  650.               {MaxTpStreams,        $(NoTitle),$(!REG_VT_DWORD), 254 },+
  651.               {MaxTSDUSize,         $(NoTitle),$(!REG_VT_DWORD), 4294967295 },+
  652.               {MaxTIDUSize,         $(NoTitle),$(!REG_VT_DWORD), 10240},+
  653. ; MaxNSDUSize added per Sri 5/31
  654.               {MaxNSDUSize,         $(NoTitle),$(!REG_VT_DWORD), 1024},+
  655. ;
  656. ; MaxNWEntities is hardcoded to 1 in Userlib\twtp4.c, not used per Sri
  657. ;            {MaxNWEntities,       $(NoTitle),$(!REG_VT_DWORD), 1   },+
  658. ;
  659.               {WindowRecvMax,       $(NoTitle),$(!REG_VT_DWORD), 6   },+
  660.               {WindowSendMax,       $(NoTitle),$(!REG_VT_DWORD), 10  },+
  661.               {WindowRecvResHiWat,  $(NoTitle),$(!REG_VT_DWORD), 256 },+
  662.               {WindowRecvResLoWat,  $(NoTitle),$(!REG_VT_DWORD), 10  },+
  663. ;
  664. ; WindowInitCredit deleted per Sri 5/31
  665. ;             {WindowInitCredit,    $(NoTitle),$(!REG_VT_DWORD), 6   },+
  666. ;
  667.               {PropFormat,          $(NoTitle),$(!REG_VT_DWORD), 1   },+
  668.               {SelFormat,           $(NoTitle),$(!REG_VT_DWORD), 1   },+
  669.               {PropTPDUSize,        $(NoTitle),$(!REG_VT_DWORD), 10  },+
  670.               {SelTPDUSizeLimit,    $(NoTitle),$(!REG_VT_DWORD), 10  },+
  671.               {PropNoChksum,        $(NoTitle),$(!REG_VT_DWORD), 0   },+
  672.               {SelNoChksum,         $(NoTitle),$(!REG_VT_DWORD), 0   },+
  673. ;
  674. ; Error Handling behaviour for Transport configurable per NIST/ENV profile
  675.               {ErrorHandling,       $(NoTitle),$(!REG_VT_DWORD), 1   },+
  676.               {ErrorCRHandling,     $(NoTitle),$(!REG_VT_DWORD), 0   },+
  677.               {ErrorInvParamVal,    $(NoTitle),$(!REG_VT_DWORD), 0   }}
  678.  
  679.  
  680.            Shell  $(UtilityInf), AddValueList, $(KeyTP4), $(NewValueList)
  681.            CloseRegKey $(KeyTP4)
  682.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  683.               Debug-Output "OEMNXP0.INF: TP4 add value ShellCode error."
  684.               CloseRegKey $(Tp4ParmKeyHandle)
  685.               CloseRegKey $(Tp4SvcKeyHandle)
  686.               goto ShellCodeError
  687.            endif
  688.            Set RegistryErrorIndex = $($R0)
  689.         endif
  690.         CloseRegKey $(Tp4ParmKeyHandle)
  691.         CloseRegKey $(Tp4SvcKeyHandle)
  692. ;
  693. ;
  694. ;       Shell "" CreateEventLog, "IsoTpSvc", $(NetEventDLL), 7
  695. ;
  696. ;
  697.         Shell $(UtilityInf), AddWinsockInfo, +
  698.              $(Product$(ThisOption)Name), +
  699.              $(Product$(ThisOption)WshDllPath), +
  700.              $(Sockmaxlength),$(Sockminlength)
  701.         set RegistryErrorIndex = $($R0)
  702.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  703.             Debug-Output "OEMNXPTP.INF: Registry error: Add Winsock Info."
  704.             CloseRegKey $($R1)
  705.         Endif
  706.         CloseRegKey $($R1)
  707.     Endif
  708. ;
  709. ;
  710.     Ifstr(i) $(DoIsoTpSys) == TRUE
  711.         Set ThisOption = ISOTPSYS
  712.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(Product$(ThisOption)Name))
  713.         Debug-Output "OEMNXPTP.INF: installing ISOTPSVC..."
  714.         Shell $(UtilityInf), CreateService, $(Product$(ThisOption)Name),+
  715.             $(Product$(ThisOption)DisplayName),+
  716.             $(Product$(ThisOption)ImagePath),+
  717.             $(Product$(ThisOption)SvcType), "",+
  718.             {"Streams"}, ""
  719.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  720.             Debug-Output "OEMNXPTP.INF: ShellCode error"
  721.             goto ShellCodeError
  722.         endif
  723.         set RegistryErrorIndex = $($R0)
  724.         CloseRegKey $($R2)
  725.         CloseRegKey $($R3)
  726.         CloseRegKey $($R1)
  727.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  728.             EndWait
  729.             CloseRegKey $($R1)
  730.             CloseRegKey $($R2)
  731.             CloseRegKey $($R3)
  732.             Debug-Output "OEMNXPTP.INF: Registry error: add software components"
  733.             goto fatalregistry
  734.         endif
  735.     Endif
  736. ;
  737. ;
  738.     Ifint $(BillboardVisible) != 0
  739.         Shell "subroutn.inf" PopBillboard
  740.         Set BillboardVisible = 0
  741.     Endif
  742.     EndWait
  743.     ifstr(i) $(DoStreams) == TRUE
  744.         Set ThisOption = STREAMS
  745.         Debug-Output "OEMNXPTP Installing STREAMS..."
  746.         Shell $(UtilityInf) AddStreams
  747.         Set OEM_ABANDON_SOFWARE = >($(OEM_ABANDON_SOFWARE), Streams)
  748.    endif
  749.    goto Successful
  750. ;
  751. ;
  752. successful = +
  753.     goto end
  754. infomsg =+
  755.    read-syms InfoDlg
  756.    ui start "Warning"
  757.    set CommonStatus = STATUS_USERCANCEL
  758.    goto end
  759. warning = +
  760.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  761.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  762.         goto ShellCodeError
  763.     endif
  764.     ifstr(i) $($R1) == "OK"
  765.         goto $(to)
  766.     else-ifstr(i) $($R1) == "CANCEL"
  767.         goto $(from)
  768.     else
  769.         goto "end"
  770.     endif
  771. nonfatalinfo = +
  772.     Set CommonStatus = STATUS_USERCANCEL
  773.     Set Severity = STATUS
  774.     goto nonfatalmsg
  775. nonfatal = +
  776.     Set Severity = NONFATAL
  777.     goto nonfatalmsg
  778. nonfatalmsg = +
  779.     ifstr(i) $(Error) == ""
  780.         Set Severity = NONFATAL
  781.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  782.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  783.             goto ShellCodeError
  784.         endif
  785.         set Error = $($R0)
  786.     endif
  787.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  788.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  789.         goto ShellCodeError
  790.     endif
  791.     ifstr(i) $($R1) == "OK"
  792.         goto $(from)
  793.     else
  794.         goto "end"
  795.     endif
  796. fatalregistry = +
  797.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  798.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  799.         goto ShellCodeError
  800.     endif
  801.     set Error = $($R0)
  802.     goto fatal
  803. fatal = +
  804.     ifstr(i) $(Error) == ""
  805.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  806.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  807.             goto ShellCodeError
  808.         endif
  809.         set Error = $($R0)
  810.     endif
  811.     Ifint $(BillboardVisible) != 0
  812.         Shell "subroutn.inf" PopBillboard
  813.         Set BillboardVisible = 0
  814.     Endif
  815.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  816.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  817.         goto ShellCodeError
  818.     endif
  819.    goto setfailed
  820. ShellCodeError = +
  821.     set DlgType      = "MessageBox"
  822.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  823.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  824.     set STF_MB_TYPE  = 1
  825.     set STF_MB_ICON  = 3
  826.     set STF_MB_DEF   = 1
  827.     ui start "Error Message"
  828.     goto setfailed
  829. setfailed = +
  830.     set CommonStatus = STATUS_FAILED
  831.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  832.         set OEM_ABANDON_ON = FALSE
  833.         goto DeInstallSW
  834.     endif
  835.     goto end
  836. end = +
  837.     goto term
  838. term = +
  839.     Return $(CommonStatus)
  840. ;
  841. ;
  842. [Install-Option]
  843.     set STF_VITAL = ""
  844.     ifstr(i) $(AddCopy) == "YES"
  845.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  846.         AddSectionFilesToCopyList Files-ISOTPEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  847.         AddSectionFilesToCopyList Files-ETC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers\etc
  848.     endif
  849.  
  850.     ifstr(i) $(DoCopy) == "YES"
  851.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  852.        Debug-Output "OEMNXPTP.INF: *** CopyFilesInCopyList [2]"
  853.        CopyFilesInCopyList
  854.     endif
  855.     ifstr(i) $(DoConfig) == "YES"
  856.     endif
  857.     Exit
  858. ;
  859. ;
  860. ;
  861. [Install-Update]
  862.    set STF_VITAL        = ""
  863.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  864.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  865.    AddSectionFilesToCopyList Files-ISOTPEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  866.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  867.  
  868.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  869.    Debug-Output "OEMNXPTP.INF: *** CopyFilesInCopyList [3]"
  870.    CopyFilesInCopyList
  871.    Exit
  872. ;
  873. ;
  874. ;
  875. [ProductType]
  876. STF_PRODUCT     = Winnt
  877. STF_PLATFORM    = I386
  878. ;
  879. ;
  880. [Files-Inf]
  881. 1,oemsetup.inf, SIZE=1000,      RENAME=$(!UG_Filename)
  882. ;
  883. ;
  884. [Files-ETC]
  885. 1,osirte, SIZE=2615
  886. ;
  887. ;
  888. [Files-ISOTP]
  889. 1,ISOTP.SYS, SIZE=171520
  890. ;
  891. ;
  892. [Files-ISOTPEXE]
  893. 1, WSHISOTP.DLL, SIZE=27648
  894. 1, PLUMBING.EXE, SIZE=114176
  895. 1, TP4CFG.DLL, SIZE=28160
  896. ;
  897. ;
  898. [FileConstantsENG]
  899.    ProCaption   = "WINDOWS NT SETUP"
  900.    ProCancel    = Cancel
  901.    ProCancelMsg = "Windows NT Networking currently Not installed. "+
  902.                   "Are You Sure, you want to cancel Copying the files?"
  903.    ProCancelCap = "Network Setup Message"
  904.    ProText1     = "Copying:"
  905.    ProText2     = "To:"
  906.    FunctionTitle= "ISO TP4/CLNP Setup"
  907. ;
  908.    ProductISOTPDescription      = "ISO TP4/CLNP System Drivers"
  909.    ProductISOTPDisplayName      = "TP4/CLNP Protocol"
  910.    ProductISOTPTitle            = "TP4/CLNP Protocol"
  911.    ProductISOTPSYSDisplayName   = "IsoTpsys"
  912.    ProductISOTPSYSTitle         = "TP4/CLNP Network Transport drivers"
  913. ;
  914.    ShellCodeErrorTitle  = "Error: "$(FunctionTitle)
  915.    ShellCodeErrorText   = "Shell Code Error."
  916. ;
  917. ;
  918. [DialogueConstantsENG]
  919.    Help         = "&Help"
  920.    Exit         = "Cancel"
  921.    OK           = "OK"
  922.    HelpContext  = ""
  923.    Continue     = "Continue"
  924.    Cancel       = "Cancel"
  925. ;
  926. ;
  927. [InfoDlg]
  928. STF_MB_TITLE    = "Information Message"
  929. DlgType         = "MessageBox"
  930. STF_MB_TEXT     = $(InfoMsgText)
  931. STF_MB_TYPE     = 1
  932. STF_MB_ICON     = 5
  933. STF_MB_DEF      = 1
  934. ;
  935. ;
  936. [InfoDlgCantConfigure]
  937. InfoMsgText = "The TP4/CLNP Service is not currently configured to use any"+
  938.         " Adapter. If you have just Installed it, return to the Network Dialog"+
  939.         " and Click OK. You will then have an opportunity to configure"
  940. ;
  941. ;
  942. [WarningDlgENG]
  943. STF_MB_TITLE    = "TP4/CLNP Setup Warning"
  944. DlgType         = "MessageBox"
  945. STF_MB_TEXT     = $(ERROR)
  946. STF_MB_TYPE     = 1
  947. STF_MB_ICON     = 5
  948. STF_MB_DEF      = 1
  949. ;
  950. ;
  951. [BillBoard1ENG]
  952. Status = "Installing TP4/CLNP and related services..."
  953. ;
  954. ;
  955.