home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / d / d423_zhw / 9.ddi / NETDTECT.IN_ / NETDTECT.IN
Encoding:
INI File  |  1993-07-24  |  10.9 KB  |  318 lines

  1. [Identification]
  2.     OptionType = NetDriver
  3. [Options]
  4.     NCDETECT
  5. [FileConstants]
  6. UtilityInf      = "UTILITY.INF"
  7. subroutineinf   = "SUBROUTN.INF"
  8. SoftwareType    = "driver"
  9. Exit_Code       = 0
  10. [GeneralConstants]
  11. from      = ""
  12. to        = ""
  13. ExitCodeOk     = 0
  14. ExitCodeCancel = 1
  15. ExitCodeFatal  = 2
  16. KeyNull         = ""
  17. MAXIMUM_ALLOWED   = 33554432
  18. RegistryErrorIndex = NO_ERROR
  19. KeyProduct      = ""
  20. KeyParameters   = ""
  21. TRUE            = 1
  22. FALSE           = 0
  23. NoTitle            = 0
  24. ExitState   = "Active"
  25. OldVersionExisted = $(FALSE)
  26. DriverPath      = $(!STF_NTPATH)\drivers
  27. ServiceKeyName  = "NetDetect"
  28. ServiceKeyPath  = "System\CurrentControlSet\Services\NcDetect"
  29. ServiceSysPath  = "%SystemRoot%\System32\Drivers\netdtect.sys"
  30. [Identify]
  31.     read-syms Identification
  32.     set Status     = STATUS_SUCCESSFUL
  33.     set Identifier = $(OptionType)
  34.     set Media      = #("Source Media Descriptions", 1, 1)
  35.     Return $(Status) $(Identifier) $(Media)
  36. [ReturnOptions]
  37.     set Status        = STATUS_FAILED
  38.     set OptionList     = {}
  39.     set OptionTextList = {}
  40.     set LanguageList = ^(LanguagesSupported, 1)
  41.     Ifcontains(i) $($0) in $(LanguageList)
  42.         goto returnoptions
  43.     else
  44.         set Status = STATUS_NOLANGUAGE
  45.         goto finish_ReturnOptions
  46.     endif
  47. returnoptions = +
  48.     set OptionList     = ^(Options, 1)
  49.     set OptionTextList = ^(OptionsText$($0), 1)
  50.     set Status         = STATUS_SUCCESSFUL
  51. finish_ReturnOptions = +
  52.     Return $(Status) $(OptionList) $(OptionTextList)
  53. [InstallOption]
  54.     set Option   = $($1)
  55.     set SrcDir   = $($2)
  56.     set AddCopy  = $($3)
  57.     set DoCopy   = $($4)
  58.     set DoConfig = $($5)
  59.     set LanguageList = ^(LanguagesSupported, 1)
  60.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  61.         Return STATUS_NOLANGUAGE
  62.     endif
  63.     set-subst LF = "\n"
  64.     read-syms GeneralConstants
  65.     read-syms FileConstants
  66.     read-syms DialogConstants$(!STF_LANGUAGE)
  67.     read-syms FileConstants$(!STF_LANGUAGE)
  68.     set-title  $(FunctionTitle)
  69.     set to   = Begin
  70.     set from = Begin
  71.     set CommonStatus = STATUS_SUCCESSFUL
  72.     EndWait
  73. Begin = +
  74.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  75.         set StartLabel = removeadapter
  76.     else-Ifstr(i) $(!NTN_InstallMode) == update
  77.         set StartLabel = UpgradeSoftware
  78.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  79.         set StartLabel = bindingadapter
  80.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  81.         set StartLabel = configureadapter
  82.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  83.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  84.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  85.                 Debug-Output "ShellCode error: cannot get an error string."
  86.                 goto ShellCodeError
  87.             endif
  88.             set Error = $($R0)
  89.             set from = end
  90.             set to = end
  91.             goto Warning
  92.         endif
  93.     else
  94.         set StartLabel = installadapter
  95.     endif
  96.     set from = $(fatal)
  97.     set to = $(fatal)
  98.     goto $(StartLabel)
  99. installadapter = +
  100.     OpenRegKey $(!REG_H_LOCAL) "" $(ServiceKeyPath) $(MAXIMUM_ALLOWED) KeyService
  101.     Ifstr $(KeyProduct) != $(KeyNull)
  102.         CloseRegKey $(KeyService)
  103.         Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  104.             $(ProductVersion)
  105.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  106.             Debug-Output "ShellCode error: cannot get an error string."
  107.             goto ShellCodeError
  108.         endif
  109.         goto end
  110.     endif
  111.     goto nextstep
  112. configureadapter = +
  113.     set OldVersionExisted = $(TRUE )
  114.     goto nextstep
  115. nextstep = +
  116.     StartWait
  117.     Goto nofilestocopy
  118.     ifstr(i) $(!NTN_InstallMode) == "install"
  119.         Ifstr(i) $(DoCopy) == "YES"
  120.            Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  121.            Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  122.                Goto fatal
  123.            Else-Ifstr(i) $($R0) == STATUS_FAILED
  124.                Goto fatal
  125.            Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  126.                Goto successful
  127.            Endif
  128.            Set SrcDir = $($R1)
  129.         Endif
  130.         install "Install-Option"
  131.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  132.            goto fatal
  133.         endif
  134.     endif
  135. nofilestocopy =+
  136.     Ifint $(OldVersionExisted) != $(FALSE)
  137.         Goto writeparameters
  138.     Endif
  139.     set OEM_ABANDON_ON = TRUE
  140. createservice =+
  141.    Shell $(UtilityInf), CreateService, $(ServiceKeyName), $(ServiceDisplayName),+
  142.          $(ServiceSysPath), "kernel", "", {}, "", "%SystemRoot%\System32\IoLogMsg.dll"
  143.    Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  144.        Debug-Output "OEMNSVRP.INF: ShellCode error creating NETDTECT service"
  145.        goto ShellCodeError
  146.    endif
  147.    Set RegistryErrorIndex = $($R0)
  148.    CloseRegKey $($R1)
  149.    CloseRegKey $($R2)
  150.    CloseRegKey $($R3)
  151.    Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  152.       EndWait
  153.       Debug-Output "OEMNSVRD.INF: Registry error: creating NETDTECT service"
  154.       CloseRegKey $($R2)
  155.       Goto fatalregistry
  156.    Endif
  157.     Shell $(UtilityInf) UpdateDetectionDllNames
  158. writeparameters = +
  159.     EndWait
  160.     goto successful
  161. bindingadapter =+
  162.     set Error = "RPC INF file invoked during bindings review."
  163.     goto fatal
  164. removeadapter = +
  165.     Set OEM_ABANDON_OPTIONS = {$(ServiceKeyName)}
  166.     ForListDo $(OEM_ABANDON_OPTIONS)
  167.         debug-output "OEMNSVRP.INF: Remove component: "$($)
  168.         Shell $(UtilityInf), RemoveService, $($), $(UseSvcctrl)
  169.     EndForListDo
  170.     goto end
  171. UpgradeSoftware = +
  172.     set Error = "Upgrade/update not supported for this product yet."
  173.     goto fatal
  174. successful = +
  175.     goto end
  176. warning = +
  177.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), STATUS, $(Error)
  178.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  179.         goto ShellCodeError
  180.     endif
  181.     ifstr(i) $($R1) == "OK"
  182.         goto $(to)
  183.     else-ifstr(i) $($R1) == "CANCEL"
  184.         goto $(from)
  185.     else
  186.         goto "end"
  187.     endif
  188. nonfatal = +
  189.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  190.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  191.         goto ShellCodeError
  192.     endif
  193.     ifstr(i) $($R1) == "OK"
  194.         goto $(from)
  195.     else
  196.         goto "end"
  197.     endif
  198. fatalregistry = +
  199.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  200.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  201.         goto ShellCodeError
  202.     endif
  203.     set Error = $($R0)
  204.     goto fatal
  205. fatal = +
  206.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  207.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  208.         goto ShellCodeError
  209.     endif
  210.     goto setfailed
  211. ShellCodeError = +
  212.     set DlgType      = "MessageBox"
  213.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  214.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  215.     set STF_MB_TYPE  = 1
  216.     set STF_MB_ICON  = 3
  217.     set STF_MB_DEF   = 1
  218.     ui start "Error Message"
  219.     goto setfailed
  220. setfailed = +
  221.     set CommonStatus = STATUS_FAILED
  222.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  223.         set OEM_ABANDON_ON = FALSE
  224.         goto removeadapter
  225.     endif
  226.     goto end
  227. end = +
  228.     goto term
  229. term = +
  230.     Return $(CommonStatus)
  231. [Install-Option]
  232.     set STF_VITAL = ""
  233.     ifstr(i) $(AddCopy) == "YES"
  234.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  235.     endif
  236.     ifstr(i) $(DoCopy) == "YES"
  237.        CopyFilesInCopyList
  238.     endif
  239.     ifstr(i) $(DoConfig) == "YES"
  240.     endif
  241.     Exit
  242. [Install-Update]
  243.    set STF_VITAL        = ""
  244.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  245.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  246.    AddSectionFilesToCopyList Files-DLL-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)
  247.    CopyFilesInCopyList
  248.    exit
  249. [Source Media Descriptions]
  250.     1    = "Windows NT Advanced Server Setup Disk #1"   , TAGFILE = disk1
  251.     2    = "Windows NT Advanced Server Setup Disk #2"   , TAGFILE = disk2
  252.     3    = "Windows NT Advanced Server Setup Disk #3"   , TAGFILE = disk3
  253.     4    = "Windows NT Advanced Server Setup Disk #4"   , TAGFILE = disk4
  254.     5    = "Windows NT Advanced Server Setup Disk #5"   , TAGFILE = disk5
  255.     6    = "Windows NT Advanced Server Setup Disk #6"   , TAGFILE = disk6
  256.     7    = "Windows NT Advanced Server Setup Disk #7"   , TAGFILE = disk7
  257.     8    = "Windows NT Advanced Server Setup Disk #8"   , TAGFILE = disk8
  258.     9    = "Windows NT Advanced Server Setup Disk #9"   , TAGFILE = disk9
  259.     10    = "Windows NT Advanced Server Setup Disk #10"  , TAGFILE = disk10
  260.     11    = "Windows NT Advanced Server Setup Disk #11"  , TAGFILE = disk11
  261.     12    = "Windows NT Advanced Server Setup Disk #12"  , TAGFILE = disk12
  262.     13    = "Windows NT Advanced Server Setup Disk #13"  , TAGFILE = disk13
  263.     14    = "Windows NT Advanced Server Setup Disk #14"  , TAGFILE = disk14
  264.     15    = "Windows NT Advanced Server Setup Disk #15"  , TAGFILE = disk15
  265.     16    = "Windows NT Advanced Server Setup Disk #16"  , TAGFILE = disk16
  266.     17    = "Windows NT Advanced Server Setup Disk #17"  , TAGFILE = disk17
  267.     18    = "Windows NT Advanced Server Setup Disk #18"  , TAGFILE = disk18
  268.     19    = "Windows NT Advanced Server Setup Disk #19"  , TAGFILE = disk19
  269.     20    = "Windows NT Advanced Server Setup Disk #20"  , TAGFILE = disk20
  270.     21    = "Windows NT Advanced Server Setup Disk #21"  , TAGFILE = disk21
  271.     22    = "Windows NT Advanced Server Setup Disk #22"  , TAGFILE = disk22
  272.     23    = "Windows NT Advanced Server Setup Disk #23"  , TAGFILE = disk23
  273.     24    = "Windows NT Advanced Server Setup Disk #24"  , TAGFILE = disk24
  274.     25    = "Windows NT Advanced Server Setup Disk #25"  , TAGFILE = disk25
  275.     26    = "Windows NT Advanced Server Setup Disk #26"  , TAGFILE = disk26
  276.     27    = "Windows NT Advanced Server Setup Disk #27"  , TAGFILE = disk27
  277.     28    = "Windows NT Advanced Server Setup Disk #28"  , TAGFILE = disk28
  278.     29    = "Windows NT Advanced Server Setup Disk #29"  , TAGFILE = disk29
  279. [ProductType]
  280. STF_PRODUCT  = LanmanNT
  281. STF_PLATFORM = I386
  282. [Files-Inf]
  283. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  284. [Files-DLL-NCDETECT]
  285. 7, MSNCDET.DLL, SIZE=84480
  286. 8, NETDTECT.DLL, SIZE=12800
  287. [Files-NCDETECT]
  288. 8,NETDTECT.SYS , SIZE=16384
  289. [LanguagesSupported]
  290.     ENG
  291. [OptionsTextENG]
  292.     NCDETECT = "Netcard Auto-detection Driver and DLLs"
  293. [FileConstantsENG]
  294. ProCaption   = "Windows NT Setup"
  295. ProCancel    = "Cancel"
  296. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  297.                "Are you sure you want to cancel copying files?"
  298. ProCancelCap = "Network Setup Message"
  299. ProText1     = "Copying:"
  300. ProText2     = "To:"
  301. FunctionTitle   = "Netcard Auto-detection Driver Setup"
  302. ProductSoftwareTitle = "Netcard Auto-detection Driver"
  303. ProductVersion = "1.0"
  304. ServiceDisplayName = "NetDetect"
  305. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  306. ShellCodeErrorText      = "Shell Code Error."
  307. [DialogConstantsENG]
  308. Help        = "&Help"
  309. Exit        = "Cancel"
  310. OK          = "OK"
  311. HelpContext = ""
  312. Continue    = "C&ontinue"
  313. Cancel      = "C&ancel"
  314. [FileDependentDlgENG]
  315.  
  316.  
  317.  
  318.