home *** CD-ROM | disk | FTP | other *** search
/ ftp.morenci.k12.mi.us / ftp.morenci.k12.mi.us.tar / ftp.morenci.k12.mi.us / Clients / w2kxpv492 / 49sp2e.exe / English / WINNT / i386 / oemsetup.inf < prev    next >
INI File  |  2002-08-15  |  28KB  |  899 lines

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