home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 January / CHIPCD1_98.iso / software / testsoft / nds / i386 / oemsetup.inf < prev    next >
INI File  |  1997-08-20  |  26KB  |  845 lines

  1. ;***********************************************************************
  2. ;
  3. ; OEMSETUP.INF
  4. ;
  5. ;    Novell IntranetWare Client base installation INF
  6. ;
  7. ;
  8. ;***********************************************************************
  9.  
  10. ;
  11. ; The following is the version info for Novell
  12. ;
  13.  
  14. ;VeRsIoN=v4.10 Novell Client Install for Windows NT (970128)
  15. ;CoPyRiGhT=copyright 1992-1997, by Novell, INC. All rights reserved.
  16.  
  17. ;-----------------------------------------------------------------------
  18. ; OPTION TYPE
  19. ; -----------
  20. ; This identifies the Option type we are dealing with.  The different
  21. ; possible types are:
  22. ;
  23. ; COMPUTER, DISPLAY, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  24. ;
  25. ;  Types specific to networking:
  26. ;
  27. ; NetAdapter,     a netcard / adapter combination or just a netcard
  28. ; NetDriver,        just a netcard driver
  29. ; NetTransport,    a complete NDIS-compliant TDI transport stack
  30. ; NetService,     an NT networking service
  31. ; NetWork,        a complete network ensemble.
  32. ; NetProvider     a complete network which supports NT MPR protocol
  33. ;-----------------------------------------------------------------------
  34.  
  35. [Identification]
  36.     OptionType = NetProvider
  37.  
  38. ;-----------------------------------------------------------------------
  39. ; OPTION LIST
  40. ; -----------
  41. ; This section lists the OEM Option key names.  These keys are locale
  42. ; independent and used to represent the option in a locale independent
  43. ; manner.
  44. ;
  45. ;-----------------------------------------------------------------------
  46.  
  47. [Options]
  48.     NWFS
  49.  
  50. ;-----------------------------------------------------------------------
  51. ; LANGUAGES SUPPORTED
  52. ; -------------------
  53. ;
  54. ; The languages supported by the OEM INF, For every language supported
  55. ; we need to have a separate text section for every displayable text
  56. ; section.
  57. ;
  58. ;-----------------------------------------------------------------------
  59.  
  60. [LanguagesSupported]
  61.     ENG, ENGLISH
  62.  
  63. [InitBaseVars]
  64.  
  65. KeyNull                    = ""
  66. MAXIMUM_ALLOWED        = 33554432
  67. KeyInfo                    = {}
  68. RegistryErrorIndex    = NO_ERROR
  69. NoTitle                    = 0
  70.  
  71. CurrentControlSet        = "SYSTEM\CurrentControlSet"
  72. ServicesBaseName        = $(CurrentControlSet)"\Services"
  73.  
  74. ;***********************************************************************
  75. ; CONSTANTS FOR USING DIALOGS
  76. ;***********************************************************************
  77.  
  78. [FileConstants]
  79.     UtilityInf                = "UTILITY.INF"
  80.     subroutineinf            = "SUBROUTN.INF"
  81.     NwSubsInf                = "NWSUBS.INF"
  82.     NwSetupDll                = "nwlangid.dll"
  83.     NwOemSetupInf            = "oemnprnw.inf"
  84.     SoftwareType            = "service"
  85.     Exit_Code                = 0
  86.  
  87.  
  88. [GeneralConstants]
  89.     from    = ""
  90.     to        = ""
  91.  
  92.     ExitCodeOk                = 0
  93.     ExitCodeCancel            = 1
  94.     ExitCodeFatal            = 2
  95.  
  96.     KeyNull                    = ""
  97.     MAXIMUM_ALLOWED        = 33554432
  98.     RegistryErrorIndex    = NO_ERROR
  99.     KeyProduct                = ""
  100.     KeyParameters            = ""
  101.  
  102.     TRUE                        = 1
  103.     FALSE                        = 0
  104.     NoTitle                    = 0
  105.  
  106.     ExitState                = "Active"
  107.     OldVersionExisted        = $(FALSE)
  108.  
  109.  
  110. [date]
  111.     ;
  112.     ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  113.     ; Minute, Second }
  114.     ;
  115.  
  116.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  117.  
  118. [DetectSystemMemory]
  119.     SystemMemory    = "" ? $(!LIBHANDLE) GetMemorySize
  120.  
  121. [ProcessorDetect]
  122.     !STF_PROCESSOR = "" ? $(!LIBHANDLE) GetProcessor
  123.  
  124.  
  125. ;---------------------------------------------------------------------------
  126. ; 1. Identify
  127. ;
  128. ; DESCRIPTION:    To verify that this INF deals with the same type of options
  129. ;                    as we are choosing currently.
  130. ;
  131. ; INPUT:            None
  132. ;
  133. ; OUTPUT:        $($R0):  STATUS: STATUS_SUCCESSFUL
  134. ;                    $($R1):  Option Type (COMPUTER ...)
  135. ;                    $($R2):  Diskette description
  136. ;---------------------------------------------------------------------------
  137. [Identify]
  138.     Set !G:DebugOutputControl = 0
  139.     Debug-Output "OEMSETUP.INF: ************************** Identify ***********************"
  140.     set NTLanguage = $(!STF_LANGUAGE)
  141.     Debug-Output "OEMSETUP.INF:  Identify, NTLanguage            = "$(NTLanguage)
  142.     Debug-Output "OEMSETUP.INF:  Identify, Current Directory    = "$(!STF_CWDDIR)
  143.     Debug-Output "OEMSETUP.INF:  Identify, Source Directory    = "$(!STF_SRCDIR)
  144.     Debug-Output "OEMSETUP.INF:  Identify, OemSetupFilePath    = "$(!P:OemSetupFilePath)
  145.     Debug-Output "OEMSETUP.INF:  Identify, OptDisketteSrc        = "$(!P:OptDisketteSrc)
  146.  
  147.     set SourceDir = $(!P:OptDisketteSrc)
  148.  
  149.     set !NW_SourceDir            = $(SourceDir)
  150.  
  151.     detect ProcessorDetect
  152.  
  153.     ifstr(i) $(!STF_PROCESSOR) == "I386"
  154.         set !STF_PLATFORM = "I386"
  155.     else-ifstr(i) $(!STF_PROCESSOR) == "I486"
  156.         set !STF_PLATFORM = "I386"
  157.     else-ifstr(i) $(!STF_PROCESSOR) == "I586"
  158.         set !STF_PLATFORM = "I386"
  159.     else-ifstr(i) $(!STF_PROCESSOR) == "R4000"
  160.         set !STF_PLATFORM = "Mips"
  161.     else
  162.         set !STF_PLATFORM = "Alpha"
  163.     endif
  164.  
  165.     StartWait
  166.  
  167.     read-syms Identification
  168.     read-syms FileConstants
  169.  
  170.     ;
  171.     ; Check if we are already installed, if so fail this request
  172.     ;
  173.  
  174.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NetWareWorkStation" $(MAXIMUM_ALLOWED) KeyProduct
  175.     ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  176.  
  177.         ;
  178.         ; Same version already existed in the local machine
  179.         ; Popup the dialog and ask the user whether he wants to continue
  180.         ;
  181.  
  182.         CloseRegKey $(KeyProduct)
  183.         set CommonStatus = STATUS_FAILED
  184.         goto end
  185.     endif
  186.  
  187.     Ifstr(i) $(SourceDir) == ""
  188.         Debug-Output "OEMSETUP.INF: SourceDir is blank, not first time install"
  189.         set Status = STATUS_FAILED
  190.         set Identifier = {}
  191.         set Media = {}
  192.         goto identify_exit
  193.     Endif
  194.  
  195.     set Status        = STATUS_SUCCESSFUL
  196.     set Identifier    = $(OptionType)
  197.  
  198.     LibraryProcedure STATUS, $(!LIBHANDLE), AppendBackSlash $(SourceDir)
  199.     Ifstr(i) $(STATUS) != "ERROR"
  200.         set SourceDir = $(STATUS)
  201.     Endif
  202.  
  203.     ;
  204.     ; Get the language name
  205.     ;
  206.  
  207.     Shell "" GetLanguageName $(SourceDir)
  208.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  209.         goto ShellCodeError
  210.     endif
  211.  
  212.     set LanguageName = $($R0)
  213.     set LangOemsetupInf = $(SourceDir)"NLS\"$(LanguageName)"\"$(NwOemSetupInf)
  214.  
  215.     FlushInf $(LangOemsetupInf)
  216.  
  217.     ;
  218.     ; Get the Media Descriptions from the language specific oemsetup
  219.     ;
  220.  
  221.     shell $(LangOemsetupInf) Identify
  222.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  223.         goto ShellCodeError
  224.     endif
  225.  
  226.     Set Status        = $($R0)
  227.     Set Identifier = $($R1)
  228.     Set Media        = $($R2)
  229.  
  230. identify_exit = +
  231.     Debug-Output "Status            = "$(Status)
  232.     Debug-Output "Identifier    = "$(Identifier)
  233.     Debug-Output "Media            = "$(Media)
  234.     goto end
  235.  
  236. ShellCodeError = +
  237.     set DlgType            = "MessageBox"
  238.     set STF_MB_TITLE    = "Error: "$(FunctionTitle)
  239.     set STF_MB_TEXT    = "Shell Code Error "$(TWM_ShellErrorTitle)
  240.     set STF_MB_TYPE    = 1
  241.     set STF_MB_ICON    = 3
  242.     set STF_MB_DEF        = 1
  243.     ui start "Error Message"
  244.     set CommonStatus = STATUS_FAILED
  245.     goto end
  246.  
  247. end = +
  248.     Return $(Status) $(Identifier) $(Media)
  249.  
  250.  
  251. ;------------------------------------------------------------------------
  252. ; 2. ReturnOptions:
  253. ;
  254. ; DESCRIPTION:    To return the option list supported by this INF and the
  255. ;                    localised text list representing the options.
  256. ;
  257. ;
  258. ; INPUT:            $($0):  Language used. ( ENG | FRN | ... )
  259. ;
  260. ; OUTPUT:        $($R0):  STATUS:
  261. ;                        STATUS_SUCCESSFUL | STATUS_NOLANGUAGE | STATUS_FAILED
  262. ;                    $($R1):  Option List
  263. ;                    $($R2):  Option Text List
  264. ;------------------------------------------------------------------------
  265. [ReturnOptions]
  266.     Set !G:DebugOutputControl = 0
  267.     Debug-Output "OEMSETUP.INF: ****************************** ReturnOptions ************************"
  268.     set NTLanguage = $($0)
  269.     Debug-Output "OEMSETUP.INF:  ReturnOptions, NTLanguage            = "$(NTLanguage)
  270.     Debug-Output "OEMSETUP.INF:  ReturnOptions, OemSetupFilePath    = "$(!P:OemSetupFilePath)
  271.     Debug-Output "OEMSETUP.INF:  ReturnOptions, OptDisketteSrc        = "$(!P:OptDisketteSrc)
  272.  
  273.     StartWait
  274.  
  275.     read-syms FileConstants
  276.  
  277.     detect ProcessorDetect
  278.  
  279.     ifstr(i) $(!STF_PROCESSOR) == "I386"
  280.         set !STF_PLATFORM = "I386"
  281.     else-ifstr(i) $(!STF_PROCESSOR) == "I486"
  282.         set !STF_PLATFORM = "I386"
  283.     else-ifstr(i) $(!STF_PROCESSOR) == "I586"
  284.         set !STF_PLATFORM = "I386"
  285.     else-ifstr(i) $(!STF_PROCESSOR) == "R4000"
  286.         set !STF_PLATFORM = "Mips"
  287.     else
  288.         set !STF_PLATFORM = "Alpha"
  289.     endif
  290.  
  291.     StartWait
  292.  
  293.     Ifstr(i) $(!NW_SourceDir) == ""
  294.         set !NW_SourceDir = $(!STF_SRCDIR)
  295.         Debug-Output "OEMSETUP.INF: NW_SourceDir set to "$(!NW_SourceDir)
  296.     Endif
  297.  
  298.     set SourceDir = $(!NW_SourceDir)
  299.  
  300.     set Status                = STATUS_FAILED
  301.     set OptionList            = {}
  302.     set OptionTextList    = {}
  303.  
  304.     LibraryProcedure STATUS, $(!LIBHANDLE), AppendBackSlash $(SourceDir)
  305.     Ifstr(i) $(STATUS) != "ERROR"
  306.         set SourceDir = $(STATUS)
  307.     Endif
  308.  
  309.     ;
  310.     ; Get the language name
  311.     ;
  312.  
  313.     Shell "" GetLanguageName $(SourceDir)
  314.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  315.         goto ShellCodeError
  316.     endif
  317.  
  318.     set LanguageName = $($R0)
  319.    set LangOemsetupInf = $(SourceDir)"NLS\"$(LanguageName)"\"$(NwOemSetupInf)
  320.  
  321.     ;
  322.     ; Get the option text from the language specific oemsetup
  323.     ;
  324.  
  325.     Shell $(LangOemsetupInf) ReturnOptions $(NTLanguage)
  326.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  327.         goto ShellCodeError
  328.     endif
  329.  
  330.     set Status                = $($R0)
  331.     set OptionList            = $($R1)
  332.     set OptionTextList    = $($R2)
  333.  
  334.     Debug-Output "Status                = "$(Status)
  335.     Debug-Output "OptionList        = "$(OptionList)
  336.     Debug-Output "OptionTextList    = "$(OptionTextList)
  337.  
  338.     EndWait
  339.     goto end
  340.  
  341. ShellCodeError = +
  342.     set DlgType            = "MessageBox"
  343.     set STF_MB_TITLE    = "Error: "$(FunctionTitle)
  344.     set STF_MB_TEXT    = "Shell Code Error "$(TWM_ShellErrorTitle)
  345.     set STF_MB_TYPE    = 1
  346.     set STF_MB_ICON    = 3
  347.     set STF_MB_DEF        = 1
  348.     ui start "Error Message"
  349.     set CommonStatus = STATUS_FAILED
  350.     goto end
  351.  
  352. end = +
  353.     Return $(Status) $(OptionList) $(OptionTextList)
  354.  
  355.  
  356. ;----------InstallOption-------------------------------------------------
  357. ;
  358. ; InstallOption:
  359. ;
  360. ;    This section is shelled to by main installation processing
  361. ;    or by NCPASHEL.INF during reconfig, removal, update, etc.
  362. ;
  363. ;
  364. ; FUNCTION:    To copy files representing Options
  365. ;                To configure the installed option
  366. ;                To update the registry for the installed option
  367. ;
  368. ; INPUT:        $($0):  Language to use
  369. ;                $($1):  OptionID to install
  370. ;                $($2):  SourceDirectory
  371. ;                $($3):  AddCopy    (YES | NO)
  372. ;                $($4):  DoCopy    (YES | NO)
  373. ;                $($5):  DoConfig (YES | NO)
  374. ;
  375. ; OUTPUT:    $($R0):  STATUS:
  376. ;                    STATUS_SUCCESSFUL | STATUS_NOLANGUAGE | STATUS_USERCANCEL | STATUS_FAILED
  377. ;
  378. ;------------------------------------------------------------------------
  379. [InstallOption]
  380.     Set !G:DebugOutputControl = 0
  381.     Debug-Output "OEMSETUP.INF: ******************* InstallOption *******************"
  382.  
  383.     StartWait
  384.  
  385.     read-syms FileConstants
  386.  
  387.     ;
  388.     ; extract parameters
  389.     ;
  390.  
  391.     set NTLanguage    = $($0)
  392.     set Option        = $($1)
  393.     set SrcDir        = $($2)
  394.     set AddCopy        = $($3)
  395.     set DoCopy        = $($4)
  396.     set DoConfig    = $($5)
  397.     set SourceDir    = $($2)
  398.  
  399.     detect ProcessorDetect
  400.  
  401.     ifstr(i) $(!STF_PROCESSOR) == "I386"
  402.         set !STF_PLATFORM = "I386"
  403.     else-ifstr(i) $(!STF_PROCESSOR) == "I486"
  404.         set !STF_PLATFORM = "I386"
  405.     else-ifstr(i) $(!STF_PROCESSOR) == "I586"
  406.         set !STF_PLATFORM = "I386"
  407.     else-ifstr(i) $(!STF_PROCESSOR) == "R4000"
  408.         set !STF_PLATFORM = "Mips"
  409.     else
  410.         set !STF_PLATFORM = "Alpha"
  411.     endif
  412.  
  413.     StartWait
  414.  
  415.     Debug-Output "InstallOption: SourceDir = "$(SourceDir)
  416.  
  417.  
  418.     LibraryProcedure STATUS, $(!LIBHANDLE), AppendBackSlash $(SourceDir)
  419.     Ifstr(i) $(STATUS) != "ERROR"
  420.         set SourceDir = $(STATUS)
  421.     Endif
  422.  
  423.     ;
  424.     ; Get the language name
  425.     ;
  426.  
  427.     Shell "" GetLanguageName $(SourceDir)
  428.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  429.         goto ShellCodeError
  430.     endif
  431.  
  432.     set LanguageName = $($R0)
  433.     Debug-Output "OEMSETUP.INF:  Using "$(LanguageName)
  434.  
  435.     set LangOemsetupInf = $(SourceDir)"NLS\"$(LanguageName)"\"$(NwOemSetupInf)
  436.  
  437.     Shell $(LangOemsetupInf) InstallOption $(NTLanguage) $(Option) $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) $(LanguageName)
  438.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  439.         goto ShellCodeError
  440.     else
  441.         set CommonStatus    = $($R0)
  442.         goto end
  443.     endif
  444.  
  445.  
  446. ShellCodeError = +
  447.     set DlgType            = "MessageBox"
  448.     set STF_MB_TITLE    = "Error: "$(FunctionTitle)
  449.     set STF_MB_TEXT    = "Shell Code Error "$(TWM_ShellErrorTitle)
  450.     set STF_MB_TYPE    = 1
  451.     set STF_MB_ICON    = 3
  452.     set STF_MB_DEF        = 1
  453.     ui start "Error Message"
  454.     set CommonStatus = STATUS_FAILED
  455.     goto end
  456.  
  457. end = +
  458.     EndWait
  459.     Return $(CommonStatus)
  460.  
  461.  
  462.  
  463. ;----------GetLanguageName-------------------------------------------------
  464. ;
  465. ; GetLanguageName:
  466. ;
  467. ;    This section is shelled to by main installation processing
  468. ;    or by NCPASHEL.INF during reconfig, removal, update, etc.
  469. ;
  470. ;
  471. ; FUNCTION:  To get the intalled language name.
  472. ;
  473. ; INPUT:    $($0):  Language Install passed in to use (ENG always, broken)
  474. ;
  475. ; OUTPUT:    $($R0): Language Name "ENGLISH", "SPANISH", etc
  476. ;
  477. ;------------------------------------------------------------------------
  478. [GetLanguageName]
  479.     set SourceDir    = $($0)
  480.  
  481.     read-syms FileConstants
  482.  
  483.     ;
  484.     ; Get the language ID for this machine from NT
  485.     ;
  486.  
  487.     LibraryProcedure STATUS, $(!LIBHANDLE), AppendBackSlash $(SourceDir)
  488.     Ifstr(i) $(STATUS) != "ERROR"
  489.         set SourceDir = $(STATUS)
  490.     Endif
  491.  
  492.     Ifstr(i) $(SourceDir) == ""
  493.         set NWSetupPath = $(NwSetupDll)
  494.     Else
  495.         set NWSetupPath = $(SourceDir)$(NwSetupDll)
  496.     Endif
  497.  
  498.     LoadLibrary "" $(NWSetupPath) NwLibHandle
  499.     LibraryProcedure LanguageName $(NwLibHandle) NWGetLanguageName $(SourceDir) "OEMSETUP.INF"
  500.     FreeLibrary $(NwLibHandle)
  501.  
  502.     Return $(LanguageName)
  503.  
  504.  
  505. ;/////////////////////////////////////////////////////////////////////////////
  506. ;/////////////////////////////////////////////////////////////////////////////
  507. ;/////////////////////////////////////////////////////////////////////////////
  508. ;/////////////////////////////////////////////////////////////////////////////
  509. ;/////////////////////////////////////////////////////////////////////////////
  510. ;/////////////////////////////////////////////////////////////////////////////
  511. ;
  512. ;    Functionality to replace that found in NCPASHEL.INF
  513. ;
  514. ;
  515.  
  516. [StfVariableDetect]
  517.     STF_PROCESSOR = "" ? $(!LIBHANDLE) GetProcessor
  518.     STF_PLATFORM  = "I386"
  519.     STF_LANGUAGE   = "" ? $(!LIBHANDLE) GetLanguage
  520.     LanguageList   = ^(LanguageID, 1)
  521.     STF_WINDOWSPATH    = "" ? $(!LIBHANDLE) GetWindowsNtDir
  522.     STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  523.     STF_NTPATH         = $(!STF_WINDOWSPATH)
  524.     STF_COMPUTERNAME   = "" ? $(!LIBHANDLE) GetMyComputerName
  525.     STF_BUSTYPE        = "" ? $(!LIBHANDLE) GetMyBusType
  526.     STF_BUSTYPELIST    = "" ? $(!LIBHANDLE) GetMyBusTypeList
  527. [StfVariableSyms]
  528.     ProcessorID_I386  = I386
  529.     ProcessorID_I486  = I486
  530.     ProcessorID_I586  = I586
  531.     ProcessorID_R4000 = R4000
  532.     ProcessorID_Alpha = Alpha_AXP
  533.     ProcessorID_PPC601  = PPC601
  534.     ProcessorID_PPC603  = PPC603
  535.     ProcessorID_PPC604  = PPC604
  536.     ProcessorID_PPC620  = PPC620
  537.     PlatformID_I386   = I386
  538.     PlatformID_Mips   = Mips
  539.     PlatformID_Alpha  = Alpha
  540.     PlatformID_PPC    = ppc
  541.     STF_PRODUCT        = WINNT
  542.     STF_USERNAME       = ""
  543.     STF_INSTALL_MODE   = "CUSTOM"
  544.     STF_UPDGRADE       = NO
  545.     STF_NCDETECT       = NO
  546.     STF_NCOPTION       = ""
  547.     STF_NCDETCARD      = 99999
  548.     STF_NCDETINFO      = {}
  549.     STF_NC_PARAMS      = {}
  550.     STF_NC_PNAMES      = {}
  551.     STF_SRCDIR_KEYED   = ""
  552.     STF_SRCDIR_USED    = ""
  553.     STF_SRCDIR_OVERRIDE = ""
  554.     STF_SRCDIR_WINNT   = ""
  555.     STF_TEMPLATE_CRITERR = "CRITERR2"
  556.     STF_TEMPLATE_NONCRITERR = "NONCRITERR2"
  557.     STF_INSTALLED_OS = {} ? $(!LIBHANDLE) GetInstalledOSNames
  558.     FatalErrorIndex = 1
  559.     !Exit_Code = 0
  560. [DoAskOemsetupSource]
  561.     read-syms DoAskUpgradeSrcDlgText$(!STF_LANGUAGE)
  562.     shell "subroutn.inf" DoAskSourceEx $($0) $(DlgText)
  563.     Return $($R0) $($R1) $($R2) $($R3)
  564. [Shell Commands]
  565.      set-title "Windows NT Setup"
  566.      Set !G:DebugOutputControl = 0
  567.      LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
  568.      Set !NCPA_HANDLE = ""
  569.      Ifstr(i) $(NTN_InfSection) != OemSoftwareInstall
  570.          LoadLibrary "y" $(!STF_CWDDIR)ncpa.cpl !NCPA_HANDLE
  571.      Endif
  572.      Shell "subroutn.inf" ReadSetupHelpIds
  573.      SetHelpFile "setupnt.hlp" $(!MinimumID) $(!MaximumID)
  574.      set-subst LF = "\n"
  575.      StartWait
  576.      read-syms StfVariableSyms
  577.      read-syms StfVariableDetect
  578.      detect StfVariableDetect
  579.      Set !STF_NTPATH = $(!STF_WINDOWSSYSPATH)
  580.      OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\ProductOptions" 33554432 KeyProductOption
  581.      ifstr(i) $(KeyProductOption) != ""
  582.          GetRegValue $(KeyProductOption) "ProductType" ProductTypeList
  583.          set TempProductType = *($(ProductTypeList),4)
  584.          ifstr(i) $(TempProductType) == "winnt"
  585.              set !STF_PRODUCT = WINNT
  586.          else-ifstr(i) $(TempProductType) == "lanmannt"
  587.              set !STF_PRODUCT = LANMANNT
  588.          else-ifstr(i) $(TempProductType) == "servernt"
  589.              set !STF_PRODUCT = SERVERNT
  590.          endif
  591.          CloseRegKey $(KeyProductOptions)
  592.      endif
  593.      Debug-Output "NCPASHEL.INF: STF_SRCDIR is "$(!STF_SRCDIR)
  594.      Debug-Output "NCPASHEL.INF: NTN_SRCPATH is "$(!NTN_SRCPATH)
  595.      Ifstr(i) $(!NTN_SRCPATH) != ""
  596.         Set !STF_ORIGINAL_SRCDIR = $(!STF_SRCDIR)
  597.         Set !STF_SRCDIR = $(!NTN_SRCPATH)
  598.         Debug-Output "NCPASHEL.INF: Reset STF_SRCDIR to:"$(!STF_SRCDIR)
  599.      Endif
  600.      Ifstr(i) $(!STF_SRCDIR) == ""
  601.          OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows Nt\CurrentVersion" $(!REG_KEY_READ) KeyNt
  602.          Ifstr(i) $(KeyNt) != ""
  603.              GetRegValue $(KeyNt) "SourcePath" SourcePathValue
  604.              Set !STF_SRCDIR = *($(SourcePathValue),4)
  605.              Debug-Output "NCPASHEL.INF: SourcePath retrieved is "$(!STF_SRCDIR)
  606.              CloseRegKey $(KeyNt)
  607.          Endif
  608.          Ifstr(i) $(!STF_SRCDIR) == ""
  609.            Set !STF_SRCDIR = "A:\"
  610.          Endif
  611.     EndIf
  612.      Set SetupInp = 0
  613.      Set !NTN_InstallPhase = secondary
  614.      OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\Setup" $(!REG_KEY_READ) KeySetup
  615.      Ifstr(i) $(KeySetup) != ""
  616.          GetRegValue $(KeySetup) "SystemSetupInProgress" SetupInpValue
  617.          Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  618.              Set SetupInp = *($(SetupInpValue),4)
  619.              Debug-Output "NCPASHEL.INF: SetupInp = "$(SetupInp)
  620.          Endif
  621.          Ifint $(SetupInp) == 1
  622.              Set !NTN_InstallPhase = primary
  623.              GetRegValue $(KeySetup) "WinntPath" SetupPathValue
  624.              Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  625.                  Set !STF_SRCDIR_WINNT = *($(SetupPathValue),4)
  626.                  Debug-Output "NCPASHEL.INF: STF_SRCDIR_WINNT = "$(!STF_SRCDIR_WINNT)
  627.              Endif
  628.          Endif
  629.          CloseRegKey $(KeySetup)
  630.      Endif
  631.      Debug-Output "NCPASHEL.INF: Setup phase = "$(!NTN_InstallPhase)
  632.    Ifstr(i) $(NTN_InfSection) == BindingsReview
  633.         Goto skipdetection
  634.    Endif
  635.    Ifstr(i) $(NTN_InstallMode) == install
  636.         Goto startdetection
  637.    Endif
  638.    Ifstr(i) $(NTN_InstallMode) == configure
  639.         Goto startdetection
  640.    Endif
  641.    Goto skipdetection
  642. startdetection = +
  643.    Ifstr(i) $(!NCPA_HANDLE) != ""
  644.        Debug-Output "NCPASHEL.INF: Enable netcard detection from NCPA.CPL"
  645.        Shell "NCPARAM.INF" Param_ControlDetection DTSTART
  646.    Endif
  647. skipdetection = +
  648.      ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_I386)
  649.          set STF_PLATFORM = $(PlatformID_I386)
  650.          set SYS      = $(ProcessorID_I386)
  651.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_I486)
  652.          set STF_PLATFORM = $(PlatformID_I386)
  653.          set SYS      = $(ProcessorID_I386)
  654.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_I586)
  655.          set STF_PLATFORM = $(PlatformID_I386)
  656.          set SYS      = $(ProcessorID_I386)
  657.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_R4000)
  658.          set STF_PLATFORM = $(PlatformID_Mips)
  659.          set SYS      = $(ProcessorID_R4000)
  660.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_Alpha)
  661.          set STF_PLATFORM = $(PlatformID_Alpha)
  662.          set SYS      = $(ProcessorID_Alpha)
  663.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_PPC601)
  664.          set STF_PLATFORM = $(PlatformID_PPC)
  665.          set SYS      = $(ProcessorID_PPC601)
  666.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_PPC603)
  667.          set STF_PLATFORM = $(PlatformID_PPC)
  668.          set SYS      = $(ProcessorID_PPC603)
  669.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_PPC604)
  670.          set STF_PLATFORM = $(PlatformID_PPC)
  671.          set SYS      = $(ProcessorID_PPC604)
  672.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_PPC620)
  673.          set STF_PLATFORM = $(PlatformID_PPC)
  674.          set SYS      = $(ProcessorID_PPC620)
  675.      else
  676.          set STF_PLATFORM = $(PlatformID_I386)
  677.          set SYS      = $(ProcessorID_I386)
  678.      endif
  679.      Ifstr(i) $(!STF_LANGUAGE) != "ENG"
  680.          Debug-Output "NCPASHEL: Language not set to English; resetting"
  681.          !STF_LANGUAGE = "ENG"
  682.      Endif
  683.      read-syms ProgressCopy$(!STF_LANGUAGE)
  684.     Ifstr(i) $(!NTN_RegBase) == ""
  685.         set !NTN_RegBase = ""
  686.     Endif
  687.     set !NTN_ServiceBase  = "SYSTEM\CurrentControlSet\SERVICES"
  688.     Ifstr(i) $(!NTN_InstallMode) == ""
  689.         Debug-Output "NCPASHEL:!NTN_InstallMode was not defined!"
  690.         set !NTN_InstallMode  = "configure"
  691.     Endif
  692.     Ifstr(i) $(!NTN_SoftwareBase) == ""
  693.         set !NTN_SoftwareBase = "SOFTWARE"
  694.     Endif
  695.     set !NTN_Origination = "ncpa"
  696.     Ifstr(i) $(!NTN_Infname) == ""
  697.         goto fatalnoinfname
  698.     Endif
  699.     Ifstr(i) $(!NTN_InfSection) == ""
  700.         Set !NTN_InfSection = "InstallOption"
  701.     Endif
  702.     ifstr(i) $(!NTN_InstallMode) == "Update"
  703. ;        Debug-Output "NCPASHEL.INF: Upgrade mode"
  704. ;        Shell "" DoAskOemsetupSource $(!STF_SRCDIR)
  705. ;        Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  706. ;            goto shellerror
  707. ;        Endif
  708. ;        ifstr(i) $($R0) == STATUS_SUCCESSFUL
  709. ;            set !STF_SRCDIR = $($R1)
  710. ;        else-ifstr(i) $($R0) == STATUS_USERCANCEL
  711. ;            set Exit_Code = 1
  712. ;            goto end
  713. ;        else
  714. ;            set Exit_Code = 2
  715. ;            goto end
  716. ;        endif
  717.         Set !NTN_Infname = $(!STF_SRCDIR)oemsetup.inf
  718.     endif
  719.     Ifstr(i) $(!NTN_InstallMode) == install
  720.         set AddCopy  = YES
  721.         set DoCopy   = YES
  722.         set DoConfig = YES
  723.     Else-ifstr(i) $(!NTN_InstallMode) == "Update"
  724.         set AddCopy  = YES
  725.         set DoCopy   = YES
  726.         set DoConfig = NO
  727.         Debug-Output "NCPASHEL.INF: Shell to "$(!NTN_Infname)
  728.         Shell $(!NTN_Infname) ReturnOptions $(!STF_LANGUAGE)
  729.         Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  730.            Debug-Output "OEMSETUP--NCPASHEL.INF: SHELL ERROR: "$($ShellCode)
  731.            goto shellerror
  732.         Endif
  733.         Ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
  734.            IfContains(i) $(!NTN_InfOption) in $($R1)
  735.               goto ContinueUpgrade
  736.            endif
  737.         endif
  738.         read-syms IncorrectOemsetupDisk$(!STF_LANGUAGE)
  739.         shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorText)
  740.         set Exit_Code = 1
  741.         goto end
  742. ContinueUpgrade = +
  743.     Endif
  744.     ifstr(i) $(!NTN_SRCPATH) != ""
  745.         Set !STF_SRCDIR_OVERRIDE = $(!STF_SRCDIR)
  746.     Endif
  747.     Shell $(!NTN_Infname) $(!NTN_InfSection) +
  748.          $(!STF_LANGUAGE) $(!NTN_InfOption) +
  749.          $(!STF_SRCDIR) $(AddCopy) $(DoCopy) $(DoConfig)
  750.     Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  751.        Debug-Output "NCPASHEL.INF: SHELL ERROR: "$($ShellCode)
  752.        goto shellerror
  753.     Endif
  754.     Debug-Output "NCPASHEL: INF return: "$($R0)
  755.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  756.         set Exit_Code = 0
  757.     else-ifstr(i) $($R0) == STATUS_USERCANCEL
  758.         set Exit_Code = 1
  759.     else-ifstr(i) $($R0) == STATUS_NO_EFFECT
  760.         set Exit_Code = 3
  761.     else-ifstr(i) $($R0) == STATUS_REBIND
  762.         set Exit_Code = 4
  763.     else-ifstr(i) $($R0) == STATUS_REBOOT
  764.         set Exit_Code = 5
  765.     else
  766.         set Exit_Code = 2
  767.     Endif
  768.     EndWait
  769.     goto end
  770. shellerror = +
  771.    read-syms ShellError$(!$ShellCode)$(!STF_LANGUAGE)
  772.    Debug-Output "NCPASHEL: SHELL ERROR: "$(Error)
  773.    goto fatal
  774. fatalnoinfname = +
  775.    set FatalErrorIndex = 2
  776.    goto fatalmsg
  777. fatalmsg = +
  778.    read-syms FatalError$(FatalErrorIndex)$(!STF_LANGUAGE)
  779.    Debug-Output "NCPASHEL: FATAL ERROR: "$(Error)
  780.    goto fatal
  781. fatal = +
  782.    read-syms FatalDlg$(!STF_LANGUAGE)
  783.    ui start "FatalError"
  784.    goto end
  785. end = +
  786.    Ifstr(i) $(!LIBHANDLE) != ""
  787.        LibraryProcedure DontCare, $(!LIBHANDLE), DeleteAllConnections
  788.    Endif
  789.    Debug-Output "NCPASHEL: NCPASHEL: returning to NCPA"
  790.    goto term
  791. term = +
  792.    Debug-Output "NCPASHEL: Bye."
  793.    exit
  794. [Source Media Descriptions]
  795.     1 = "Windows NT Workstation CD-ROM" , TAGFILE = cdrom.w
  796. [Signature]
  797.     FileType = MICROSOFT_FILE
  798. [GetSignature]
  799.     read-syms Signature
  800.     return $(FileType)
  801. [ProductType]
  802. STF_PRODUCT  = Winnt
  803. STF_PLATFORM = I386
  804. [Files-Inf]
  805. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  806. [LanguageID]
  807.    ENG
  808. [LanguageTextENG]
  809.    "English (United States)"
  810. [ProgressCopyENG]
  811.     ProCaption   = "Windows NT Networking Setup"
  812.     ProCancel    = "Cancel"
  813.     ProCancelMsg = "Windows NT is not correctly installed.  Are you sure you want "+
  814.                    "to cancel copying files?"
  815.     ProCancelCap = "Setup Message"
  816.     ProText1     = "Copying:"
  817.     ProText2     = "To:"
  818.     PlatformID_I386 = I386
  819.     PlatformID_Mips = Mips
  820.     PlatformID_PPC  = ppc
  821. [FatalDlgENG]
  822. STF_MB_TITLE = "Setup Message"
  823. DlgType = "MessageBox"
  824. STF_MB_TEXT  = $(Error)
  825. STF_MB_TYPE  = 1
  826. STF_MB_ICON  = 3
  827. STF_MB_DEF   = 1
  828. [FatalError1ENG]
  829. Error = "Initialization failed"
  830. [FatalError2ENG]
  831. Error = "No INF file name given (NTN_Infname)"
  832. [FatalError3ENG]
  833. Error = "Invocation of INF file "$(!NTN_Infname)" failed"
  834. [ShellError1ENG]
  835. Error = "INF file "$(!NTN_Infname)" does not exist"
  836. [ShellError2ENG]
  837. Error = "INF file "$(!NTN_Infname)" does not have a section named "$(!NTN_InfSection)
  838. [ShellError3ENG]
  839. Error = "INF file "$(!NTN_Infname)", section "$(!NTN_InfSection)" has syntax errors"
  840. [DoAskUpgradeSrcDlgTextENG]
  841.     DlgText        = "Please enter the full path for the upgrade/update "+
  842.                      "OEMSETUP.INF file. Then choose Continue."
  843. [IncorrectOemsetupDiskENG]
  844.     ErrorText      = "Update aborted. The OEMSETUP.INF does not support upgrade for the specified component."
  845.