home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April / Chip_1997-04_cd.bin / ovladace / novell / ntenu_n2 / ntenu_n2.exe / I386 / OEMSETUP.INF < prev    next >
Encoding:
INI File  |  1996-11-04  |  24.7 KB  |  802 lines

  1. ;***********************************************************************
  2. ;
  3. ; OEMSETUP.INF
  4. ;
  5. ;    Novell NetWare base installation INF
  6. ;
  7. ;
  8. ;***********************************************************************
  9.  
  10. ;
  11. ; The following is the version info for Novell
  12. ;
  13.  
  14. ;VeRsIoN=v4.0.B1.2.16 Novell Client Install for Windows NT (961018)
  15. ;CoPyRiGhT=copyright 1992, 1993, 1994, 1995, 1996, 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.  
  209.     set LanguageName = $($R0)
  210.     set LangOemsetupInf = $(SourceDir)"NLS\"$(LanguageName)"\"$(NwOemSetupInf)
  211.  
  212.     FlushInf $(LangOemsetupInf)
  213.  
  214.     ;
  215.     ; Get the Media Descriptions from the language specific oemsetup
  216.     ;
  217.  
  218.     shell $(LangOemsetupInf) Identify
  219.  
  220.     Set Status        = $($R0)
  221.     Set Identifier = $($R1)
  222.     Set Media        = $($R2)
  223.  
  224. identify_exit = +
  225.     Debug-Output "Status            = "$(Status)
  226.     Debug-Output "Identifier    = "$(Identifier)
  227.     Debug-Output "Media            = "$(Media)
  228.  
  229.     Return $(Status) $(Identifier) $(Media)
  230.  
  231.  
  232. ;------------------------------------------------------------------------
  233. ; 2. ReturnOptions:
  234. ;
  235. ; DESCRIPTION:    To return the option list supported by this INF and the
  236. ;                    localised text list representing the options.
  237. ;
  238. ;
  239. ; INPUT:            $($0):  Language used. ( ENG | FRN | ... )
  240. ;
  241. ; OUTPUT:        $($R0):  STATUS:
  242. ;                        STATUS_SUCCESSFUL | STATUS_NOLANGUAGE | STATUS_FAILED
  243. ;                    $($R1):  Option List
  244. ;                    $($R2):  Option Text List
  245. ;------------------------------------------------------------------------
  246. [ReturnOptions]
  247.     Set !G:DebugOutputControl = 0
  248.     Debug-Output "OEMSETUP.INF: ****************************** ReturnOptions ************************"
  249.     set NTLanguage = $($0)
  250.     Debug-Output "OEMSETUP.INF:  ReturnOptions, NTLanguage            = "$(NTLanguage)
  251.     Debug-Output "OEMSETUP.INF:  ReturnOptions, OemSetupFilePath    = "$(!P:OemSetupFilePath)
  252.     Debug-Output "OEMSETUP.INF:  ReturnOptions, OptDisketteSrc        = "$(!P:OptDisketteSrc)
  253.  
  254.     StartWait
  255.  
  256.     read-syms FileConstants
  257.  
  258.     detect ProcessorDetect
  259.  
  260.     ifstr(i) $(!STF_PROCESSOR) == "I386"
  261.         set !STF_PLATFORM = "I386"
  262.     else-ifstr(i) $(!STF_PROCESSOR) == "I486"
  263.         set !STF_PLATFORM = "I386"
  264.     else-ifstr(i) $(!STF_PROCESSOR) == "I586"
  265.         set !STF_PLATFORM = "I386"
  266.     else-ifstr(i) $(!STF_PROCESSOR) == "R4000"
  267.         set !STF_PLATFORM = "Mips"
  268.     else
  269.         set !STF_PLATFORM = "Alpha"
  270.     endif
  271.  
  272.     StartWait
  273.  
  274.     Ifstr(i) $(!NW_SourceDir) == ""
  275.         set !NW_SourceDir = $(!STF_SRCDIR)
  276.         Debug-Output "OEMSETUP.INF: NW_SourceDir set to "$(!NW_SourceDir)
  277.     Endif
  278.  
  279.     set SourceDir = $(!NW_SourceDir)
  280.  
  281.     set Status                = STATUS_FAILED
  282.     set OptionList            = {}
  283.     set OptionTextList    = {}
  284.  
  285.     LibraryProcedure STATUS, $(!LIBHANDLE), AppendBackSlash $(SourceDir)
  286.     Ifstr(i) $(STATUS) != "ERROR"
  287.         set SourceDir = $(STATUS)
  288.     Endif
  289.  
  290.     ;
  291.     ; Get the language name
  292.     ;
  293.  
  294.     Shell "" GetLanguageName $(SourceDir)
  295.  
  296.     set LanguageName = $($R0)
  297.    set LangOemsetupInf = $(SourceDir)"NLS\"$(LanguageName)"\"$(NwOemSetupInf)
  298.  
  299.     ;
  300.     ; Get the option text from the language specific oemsetup
  301.     ;
  302.  
  303.     Shell $(LangOemsetupInf) ReturnOptions $(NTLanguage)
  304.     set Status                = $($R0)
  305.     set OptionList            = $($R1)
  306.     set OptionTextList    = $($R2)
  307.  
  308.     Debug-Output "Status                = "$(Status)
  309.     Debug-Output "OptionList        = "$(OptionList)
  310.     Debug-Output "OptionTextList    = "$(OptionTextList)
  311.  
  312.     EndWait
  313.  
  314.     Return $(Status) $(OptionList) $(OptionTextList)
  315.  
  316.  
  317. ;----------InstallOption-------------------------------------------------
  318. ;
  319. ; InstallOption:
  320. ;
  321. ;    This section is shelled to by main installation processing
  322. ;    or by NCPASHEL.INF during reconfig, removal, update, etc.
  323. ;
  324. ;
  325. ; FUNCTION:    To copy files representing Options
  326. ;                To configure the installed option
  327. ;                To update the registry for the installed option
  328. ;
  329. ; INPUT:        $($0):  Language to use
  330. ;                $($1):  OptionID to install
  331. ;                $($2):  SourceDirectory
  332. ;                $($3):  AddCopy    (YES | NO)
  333. ;                $($4):  DoCopy    (YES | NO)
  334. ;                $($5):  DoConfig (YES | NO)
  335. ;
  336. ; OUTPUT:    $($R0):  STATUS:
  337. ;                    STATUS_SUCCESSFUL | STATUS_NOLANGUAGE | STATUS_USERCANCEL | STATUS_FAILED
  338. ;
  339. ;------------------------------------------------------------------------
  340. [InstallOption]
  341.     Set !G:DebugOutputControl = 0
  342.     Debug-Output "OEMSETUP.INF: ******************* InstallOption *******************"
  343.  
  344.     StartWait
  345.  
  346.     read-syms FileConstants
  347.  
  348.     ;
  349.     ; extract parameters
  350.     ;
  351.  
  352.     set NTLanguage    = $($0)
  353.     set Option        = $($1)
  354.     set SrcDir        = $($2)
  355.     set AddCopy        = $($3)
  356.     set DoCopy        = $($4)
  357.     set DoConfig    = $($5)
  358.     set SourceDir    = $($2)
  359.  
  360.     detect ProcessorDetect
  361.  
  362.     ifstr(i) $(!STF_PROCESSOR) == "I386"
  363.         set !STF_PLATFORM = "I386"
  364.     else-ifstr(i) $(!STF_PROCESSOR) == "I486"
  365.         set !STF_PLATFORM = "I386"
  366.     else-ifstr(i) $(!STF_PROCESSOR) == "I586"
  367.         set !STF_PLATFORM = "I386"
  368.     else-ifstr(i) $(!STF_PROCESSOR) == "R4000"
  369.         set !STF_PLATFORM = "Mips"
  370.     else
  371.         set !STF_PLATFORM = "Alpha"
  372.     endif
  373.  
  374.     StartWait
  375.  
  376.     Debug-Output "InstallOption: SourceDir = "$(SourceDir)
  377.  
  378.  
  379.     LibraryProcedure STATUS, $(!LIBHANDLE), AppendBackSlash $(SourceDir)
  380.     Ifstr(i) $(STATUS) != "ERROR"
  381.         set SourceDir = $(STATUS)
  382.     Endif
  383.  
  384.     ;
  385.     ; Get the language name
  386.     ;
  387.  
  388.     Shell "" GetLanguageName $(SourceDir)
  389.     set LanguageName = $($R0)
  390.     Debug-Output "OEMSETUP.INF:  Using "$(LanguageName)
  391.  
  392.     set LangOemsetupInf = $(SourceDir)"NLS\"$(LanguageName)"\"$(NwOemSetupInf)
  393.  
  394.     Shell $(LangOemsetupInf) InstallOption $(NTLanguage) $(Option) $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) $(LanguageName)
  395.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  396.         goto ShellCodeError
  397.     else
  398.         set CommonStatus    = $($R0)
  399.         goto end
  400.     endif
  401.  
  402.  
  403. ShellCodeError = +
  404.     set DlgType            = "MessageBox"
  405.     set STF_MB_TITLE    = "Error: "$(FunctionTitle)
  406.     set STF_MB_TEXT    = "Shell Code Error "$(TWM_ShellErrorTitle)
  407.     set STF_MB_TYPE    = 1
  408.     set STF_MB_ICON    = 3
  409.     set STF_MB_DEF        = 1
  410.     ui start "Error Message"
  411.     set CommonStatus = STATUS_FAILED
  412.     goto end
  413.  
  414. end = +
  415.     EndWait
  416.     Return $(CommonStatus)
  417.  
  418.  
  419.  
  420. ;----------GetLanguageName-------------------------------------------------
  421. ;
  422. ; GetLanguageName:
  423. ;
  424. ;    This section is shelled to by main installation processing
  425. ;    or by NCPASHEL.INF during reconfig, removal, update, etc.
  426. ;
  427. ;
  428. ; FUNCTION:  To get the intalled language name.
  429. ;
  430. ; INPUT:    $($0):  Language Install passed in to use (ENG always, broken)
  431. ;
  432. ; OUTPUT:    $($R0): Language Name "ENGLISH", "SPANISH", etc
  433. ;
  434. ;------------------------------------------------------------------------
  435. [GetLanguageName]
  436.     set SourceDir    = $($0)
  437.  
  438.     read-syms FileConstants
  439.  
  440.     ;
  441.     ; Get the language ID for this machine from NT
  442.     ;
  443.  
  444.     LibraryProcedure STATUS, $(!LIBHANDLE), AppendBackSlash $(SourceDir)
  445.     Ifstr(i) $(STATUS) != "ERROR"
  446.         set SourceDir = $(STATUS)
  447.     Endif
  448.  
  449.     Ifstr(i) $(SourceDir) == ""
  450.         set NWSetupPath = $(NwSetupDll)
  451.     Else
  452.         set NWSetupPath = $(SourceDir)$(NwSetupDll)
  453.     Endif
  454.  
  455.     LoadLibrary "" $(NWSetupPath) NwLibHandle
  456.     LibraryProcedure LanguageName $(NwLibHandle) NWGetLanguageName $(SourceDir) "OEMSETUP.INF"
  457.     FreeLibrary $(NwLibHandle)
  458.  
  459.     Return $(LanguageName)
  460.  
  461.  
  462. ;/////////////////////////////////////////////////////////////////////////////
  463. ;/////////////////////////////////////////////////////////////////////////////
  464. ;/////////////////////////////////////////////////////////////////////////////
  465. ;/////////////////////////////////////////////////////////////////////////////
  466. ;/////////////////////////////////////////////////////////////////////////////
  467. ;/////////////////////////////////////////////////////////////////////////////
  468. ;
  469. ;    Functionality to replace that found in NCPASHEL.INF
  470. ;
  471. ;
  472.  
  473. [StfVariableDetect]
  474.     STF_PROCESSOR = "" ? $(!LIBHANDLE) GetProcessor
  475.     STF_PLATFORM  = "I386"
  476.     STF_LANGUAGE   = "" ? $(!LIBHANDLE) GetLanguage
  477.     LanguageList   = ^(LanguageID, 1)
  478.     STF_WINDOWSPATH    = "" ? $(!LIBHANDLE) GetWindowsNtDir
  479.     STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  480.     STF_NTPATH         = $(!STF_WINDOWSPATH)
  481.     STF_COMPUTERNAME   = "" ? $(!LIBHANDLE) GetMyComputerName
  482.     STF_BUSTYPE        = "" ? $(!LIBHANDLE) GetMyBusType
  483.     STF_BUSTYPELIST    = "" ? $(!LIBHANDLE) GetMyBusTypeList
  484. [StfVariableSyms]
  485.     ProcessorID_I386  = I386
  486.     ProcessorID_I486  = I486
  487.     ProcessorID_I586  = I586
  488.     ProcessorID_R4000 = R4000
  489.     ProcessorID_Alpha = Alpha_AXP
  490.     ProcessorID_PPC601  = PPC601
  491.     ProcessorID_PPC603  = PPC603
  492.     ProcessorID_PPC604  = PPC604
  493.     ProcessorID_PPC620  = PPC620
  494.     PlatformID_I386   = I386
  495.     PlatformID_Mips   = Mips
  496.     PlatformID_Alpha  = Alpha
  497.     PlatformID_PPC    = ppc
  498.     STF_PRODUCT        = WINNT
  499.     STF_USERNAME       = ""
  500.     STF_INSTALL_MODE   = "CUSTOM"
  501.     STF_UPDGRADE       = NO
  502.     STF_NCDETECT       = NO
  503.     STF_NCOPTION       = ""
  504.     STF_NCDETCARD      = 99999
  505.     STF_NCDETINFO      = {}
  506.     STF_NC_PARAMS      = {}
  507.     STF_NC_PNAMES      = {}
  508.     STF_SRCDIR_KEYED   = ""
  509.     STF_SRCDIR_USED    = ""
  510.     STF_SRCDIR_OVERRIDE = ""
  511.     STF_SRCDIR_WINNT   = ""
  512.     STF_TEMPLATE_CRITERR = "CRITERR2"
  513.     STF_TEMPLATE_NONCRITERR = "NONCRITERR2"
  514.     STF_INSTALLED_OS = {} ? $(!LIBHANDLE) GetInstalledOSNames
  515.     FatalErrorIndex = 1
  516.     !Exit_Code = 0
  517. [DoAskOemsetupSource]
  518.     read-syms DoAskUpgradeSrcDlgText$(!STF_LANGUAGE)
  519.     shell "subroutn.inf" DoAskSourceEx $($0) $(DlgText)
  520.     Return $($R0) $($R1) $($R2) $($R3)
  521. [Shell Commands]
  522.      set-title "Windows NT Setup"
  523.      Set !G:DebugOutputControl = 0
  524.      LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
  525.      Set !NCPA_HANDLE = ""
  526.      Ifstr(i) $(NTN_InfSection) != OemSoftwareInstall
  527.          LoadLibrary "y" $(!STF_CWDDIR)ncpa.cpl !NCPA_HANDLE
  528.      Endif
  529.      Shell "subroutn.inf" ReadSetupHelpIds
  530.      SetHelpFile "setupnt.hlp" $(!MinimumID) $(!MaximumID)
  531.      set-subst LF = "\n"
  532.      StartWait
  533.      read-syms StfVariableSyms
  534.      read-syms StfVariableDetect
  535.      detect StfVariableDetect
  536.      Set !STF_NTPATH = $(!STF_WINDOWSSYSPATH)
  537.      OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\ProductOptions" 33554432 KeyProductOption
  538.      ifstr(i) $(KeyProductOption) != ""
  539.          GetRegValue $(KeyProductOption) "ProductType" ProductTypeList
  540.          set TempProductType = *($(ProductTypeList),4)
  541.          ifstr(i) $(TempProductType) == "winnt"
  542.              set !STF_PRODUCT = WINNT
  543.          else-ifstr(i) $(TempProductType) == "lanmannt"
  544.              set !STF_PRODUCT = LANMANNT
  545.          else-ifstr(i) $(TempProductType) == "servernt"
  546.              set !STF_PRODUCT = SERVERNT
  547.          endif
  548.          CloseRegKey $(KeyProductOptions)
  549.      endif
  550.      Debug-Output "NCPASHEL.INF: STF_SRCDIR is "$(!STF_SRCDIR)
  551.      Debug-Output "NCPASHEL.INF: NTN_SRCPATH is "$(!NTN_SRCPATH)
  552.      Ifstr(i) $(!NTN_SRCPATH) != ""
  553.         Set !STF_ORIGINAL_SRCDIR = $(!STF_SRCDIR)
  554.         Set !STF_SRCDIR = $(!NTN_SRCPATH)
  555.         Debug-Output "NCPASHEL.INF: Reset STF_SRCDIR to:"$(!STF_SRCDIR)
  556.      Endif
  557.      Ifstr(i) $(!STF_SRCDIR) == ""
  558.          OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows Nt\CurrentVersion" $(!REG_KEY_READ) KeyNt
  559.          Ifstr(i) $(KeyNt) != ""
  560.              GetRegValue $(KeyNt) "SourcePath" SourcePathValue
  561.              Set !STF_SRCDIR = *($(SourcePathValue),4)
  562.              Debug-Output "NCPASHEL.INF: SourcePath retrieved is "$(!STF_SRCDIR)
  563.              CloseRegKey $(KeyNt)
  564.          Endif
  565.          Ifstr(i) $(!STF_SRCDIR) == ""
  566.            Set !STF_SRCDIR = "A:\"
  567.          Endif
  568.     EndIf
  569.      Set SetupInp = 0
  570.      Set !NTN_InstallPhase = secondary
  571.      OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\Setup" $(!REG_KEY_READ) KeySetup
  572.      Ifstr(i) $(KeySetup) != ""
  573.          GetRegValue $(KeySetup) "SystemSetupInProgress" SetupInpValue
  574.          Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  575.              Set SetupInp = *($(SetupInpValue),4)
  576.              Debug-Output "NCPASHEL.INF: SetupInp = "$(SetupInp)
  577.          Endif
  578.          Ifint $(SetupInp) == 1
  579.              Set !NTN_InstallPhase = primary
  580.              GetRegValue $(KeySetup) "WinntPath" SetupPathValue
  581.              Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  582.                  Set !STF_SRCDIR_WINNT = *($(SetupPathValue),4)
  583.                  Debug-Output "NCPASHEL.INF: STF_SRCDIR_WINNT = "$(!STF_SRCDIR_WINNT)
  584.              Endif
  585.          Endif
  586.          CloseRegKey $(KeySetup)
  587.      Endif
  588.      Debug-Output "NCPASHEL.INF: Setup phase = "$(!NTN_InstallPhase)
  589.    Ifstr(i) $(NTN_InfSection) == BindingsReview
  590.         Goto skipdetection
  591.    Endif
  592.    Ifstr(i) $(NTN_InstallMode) == install
  593.         Goto startdetection
  594.    Endif
  595.    Ifstr(i) $(NTN_InstallMode) == configure
  596.         Goto startdetection
  597.    Endif
  598.    Goto skipdetection
  599. startdetection = +
  600.    Ifstr(i) $(!NCPA_HANDLE) != ""
  601.        Debug-Output "NCPASHEL.INF: Enable netcard detection from NCPA.CPL"
  602.        Shell "NCPARAM.INF" Param_ControlDetection DTSTART
  603.    Endif
  604. skipdetection = +
  605.      ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_I386)
  606.          set STF_PLATFORM = $(PlatformID_I386)
  607.          set SYS      = $(ProcessorID_I386)
  608.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_I486)
  609.          set STF_PLATFORM = $(PlatformID_I386)
  610.          set SYS      = $(ProcessorID_I386)
  611.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_I586)
  612.          set STF_PLATFORM = $(PlatformID_I386)
  613.          set SYS      = $(ProcessorID_I386)
  614.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_R4000)
  615.          set STF_PLATFORM = $(PlatformID_Mips)
  616.          set SYS      = $(ProcessorID_R4000)
  617.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_Alpha)
  618.          set STF_PLATFORM = $(PlatformID_Alpha)
  619.          set SYS      = $(ProcessorID_Alpha)
  620.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_PPC601)
  621.          set STF_PLATFORM = $(PlatformID_PPC)
  622.          set SYS      = $(ProcessorID_PPC601)
  623.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_PPC603)
  624.          set STF_PLATFORM = $(PlatformID_PPC)
  625.          set SYS      = $(ProcessorID_PPC603)
  626.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_PPC604)
  627.          set STF_PLATFORM = $(PlatformID_PPC)
  628.          set SYS      = $(ProcessorID_PPC604)
  629.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_PPC620)
  630.          set STF_PLATFORM = $(PlatformID_PPC)
  631.          set SYS      = $(ProcessorID_PPC620)
  632.      else
  633.          set STF_PLATFORM = $(PlatformID_I386)
  634.          set SYS      = $(ProcessorID_I386)
  635.      endif
  636.      Ifstr(i) $(!STF_LANGUAGE) != "ENG"
  637.          Debug-Output "NCPASHEL: Language not set to English; resetting"
  638.          !STF_LANGUAGE = "ENG"
  639.      Endif
  640.      read-syms ProgressCopy$(!STF_LANGUAGE)
  641.     Ifstr(i) $(!NTN_RegBase) == ""
  642.         set !NTN_RegBase = ""
  643.     Endif
  644.     set !NTN_ServiceBase  = "SYSTEM\CurrentControlSet\SERVICES"
  645.     Ifstr(i) $(!NTN_InstallMode) == ""
  646.         Debug-Output "NCPASHEL:!NTN_InstallMode was not defined!"
  647.         set !NTN_InstallMode  = "configure"
  648.     Endif
  649.     Ifstr(i) $(!NTN_SoftwareBase) == ""
  650.         set !NTN_SoftwareBase = "SOFTWARE"
  651.     Endif
  652.     set !NTN_Origination = "ncpa"
  653.     Ifstr(i) $(!NTN_Infname) == ""
  654.         goto fatalnoinfname
  655.     Endif
  656.     Ifstr(i) $(!NTN_InfSection) == ""
  657.         Set !NTN_InfSection = "InstallOption"
  658.     Endif
  659.     ifstr(i) $(!NTN_InstallMode) == "Update"
  660. ;        Debug-Output "NCPASHEL.INF: Upgrade mode"
  661. ;        Shell "" DoAskOemsetupSource $(!STF_SRCDIR)
  662. ;        Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  663. ;            goto shellerror
  664. ;        Endif
  665. ;        ifstr(i) $($R0) == STATUS_SUCCESSFUL
  666. ;            set !STF_SRCDIR = $($R1)
  667. ;        else-ifstr(i) $($R0) == STATUS_USERCANCEL
  668. ;            set Exit_Code = 1
  669. ;            goto end
  670. ;        else
  671. ;            set Exit_Code = 2
  672. ;            goto end
  673. ;        endif
  674.         Set !NTN_Infname = $(!STF_SRCDIR)oemsetup.inf
  675.     endif
  676.     Ifstr(i) $(!NTN_InstallMode) == install
  677.         set AddCopy  = YES
  678.         set DoCopy   = YES
  679.         set DoConfig = YES
  680.     Else-ifstr(i) $(!NTN_InstallMode) == "Update"
  681.         set AddCopy  = YES
  682.         set DoCopy   = YES
  683.         set DoConfig = NO
  684.         Debug-Output "NCPASHEL.INF: Shell to "$(!NTN_Infname)
  685.         Shell $(!NTN_Infname) ReturnOptions $(!STF_LANGUAGE)
  686.         Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  687.            Debug-Output "OEMSETUP--NCPASHEL.INF: SHELL ERROR: "$($ShellCode)
  688.            goto shellerror
  689.         Endif
  690.         Ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
  691.            IfContains(i) $(!NTN_InfOption) in $($R1)
  692.               goto ContinueUpgrade
  693.            endif
  694.         endif
  695.         read-syms IncorrectOemsetupDisk$(!STF_LANGUAGE)
  696.         shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorText)
  697.         set Exit_Code = 1
  698.         goto end
  699. ContinueUpgrade = +
  700.     Endif
  701.     ifstr(i) $(!NTN_SRCPATH) != ""
  702.         Set !STF_SRCDIR_OVERRIDE = $(!STF_SRCDIR)
  703.     Endif
  704.     Shell $(!NTN_Infname) $(!NTN_InfSection) +
  705.          $(!STF_LANGUAGE) $(!NTN_InfOption) +
  706.          $(!STF_SRCDIR) $(AddCopy) $(DoCopy) $(DoConfig)
  707.     Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  708.        Debug-Output "NCPASHEL.INF: SHELL ERROR: "$($ShellCode)
  709.        goto shellerror
  710.     Endif
  711.     Debug-Output "NCPASHEL: INF return: "$($R0)
  712.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  713.         set Exit_Code = 0
  714.     else-ifstr(i) $($R0) == STATUS_USERCANCEL
  715.         set Exit_Code = 1
  716.     else-ifstr(i) $($R0) == STATUS_NO_EFFECT
  717.         set Exit_Code = 3
  718.     else-ifstr(i) $($R0) == STATUS_REBIND
  719.         set Exit_Code = 4
  720.     else-ifstr(i) $($R0) == STATUS_REBOOT
  721.         set Exit_Code = 5
  722.     else
  723.         set Exit_Code = 2
  724.     Endif
  725.     EndWait
  726.     goto end
  727. shellerror = +
  728.    read-syms ShellError$(!$ShellCode)$(!STF_LANGUAGE)
  729.    Debug-Output "NCPASHEL: SHELL ERROR: "$(Error)
  730.    goto fatal
  731. fatalnoinfname = +
  732.    set FatalErrorIndex = 2
  733.    goto fatalmsg
  734. fatalmsg = +
  735.    read-syms FatalError$(FatalErrorIndex)$(!STF_LANGUAGE)
  736.    Debug-Output "NCPASHEL: FATAL ERROR: "$(Error)
  737.    goto fatal
  738. fatal = +
  739.    read-syms FatalDlg$(!STF_LANGUAGE)
  740.    ui start "FatalError"
  741.    goto end
  742. end = +
  743.    Ifstr(i) $(!LIBHANDLE) != ""
  744.        LibraryProcedure DontCare, $(!LIBHANDLE), DeleteAllConnections
  745.    Endif
  746.    Debug-Output "NCPASHEL: NCPASHEL: returning to NCPA"
  747.    goto term
  748. term = +
  749.    Debug-Output "NCPASHEL: Bye."
  750.    exit
  751. [Source Media Descriptions]
  752.     1 = "Windows NT Workstation CD-ROM" , TAGFILE = cdrom.w
  753. [Signature]
  754.     FileType = MICROSOFT_FILE
  755. [GetSignature]
  756.     read-syms Signature
  757.     return $(FileType)
  758. [ProductType]
  759. STF_PRODUCT  = Winnt
  760. STF_PLATFORM = I386
  761. [Files-Inf]
  762. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  763. [LanguageID]
  764.    ENG
  765. [LanguageTextENG]
  766.    "English (United States)"
  767. [ProgressCopyENG]
  768.     ProCaption   = "Windows NT Networking Setup"
  769.     ProCancel    = "Cancel"
  770.     ProCancelMsg = "Windows NT is not correctly installed.  Are you sure you want "+
  771.                    "to cancel copying files?"
  772.     ProCancelCap = "Setup Message"
  773.     ProText1     = "Copying:"
  774.     ProText2     = "To:"
  775.     PlatformID_I386 = I386
  776.     PlatformID_Mips = Mips
  777.     PlatformID_PPC  = ppc
  778. [FatalDlgENG]
  779. STF_MB_TITLE = "Setup Message"
  780. DlgType = "MessageBox"
  781. STF_MB_TEXT  = $(Error)
  782. STF_MB_TYPE  = 1
  783. STF_MB_ICON  = 3
  784. STF_MB_DEF   = 1
  785. [FatalError1ENG]
  786. Error = "Initialization failed"
  787. [FatalError2ENG]
  788. Error = "No INF file name given (NTN_Infname)"
  789. [FatalError3ENG]
  790. Error = "Invocation of INF file "$(!NTN_Infname)" failed"
  791. [ShellError1ENG]
  792. Error = "INF file "$(!NTN_Infname)" does not exist"
  793. [ShellError2ENG]
  794. Error = "INF file "$(!NTN_Infname)" does not have a section named "$(!NTN_InfSection)
  795. [ShellError3ENG]
  796. Error = "INF file "$(!NTN_Infname)", section "$(!NTN_InfSection)" has syntax errors"
  797. [DoAskUpgradeSrcDlgTextENG]
  798.     DlgText        = "Please enter the full path for the upgrade/update "+
  799.                      "OEMSETUP.INF file. Then choose Continue."
  800. [IncorrectOemsetupDiskENG]
  801.     ErrorText      = "Update aborted. The OEMSETUP.INF does not support upgrade for the specified component."
  802.