home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / d / d423_liu / 8.ddi / NCPASHEL.IN_ / NCPASHEL.IN
Encoding:
INI File  |  1993-07-24  |  12.2 KB  |  311 lines

  1. [StfVariableDetect]
  2.     STF_PROCESSOR = "" ? $(!LIBHANDLE) GetProcessor
  3.     STF_PLATFORM  = "I386"        
  4.     STF_LANGUAGE   = "" ? $(!LIBHANDLE) GetLanguage
  5.     LanguageList   = ^(LanguageID, 1)
  6.     STF_WINDOWSPATH    = "" ? $(!LIBHANDLE) GetWindowsNtDir
  7.     STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  8.     STF_NTPATH         = $(!STF_WINDOWSPATH)
  9.     STF_COMPUTERNAME   = "" ? $(!LIBHANDLE) GetMyComputerName
  10.     STF_BUSTYPE        = "" ? $(!LIBHANDLE) GetMyBusType
  11. [StfVariableSyms]
  12.     ProcessorID_I386  = I386
  13.     ProcessorID_I486  = I486
  14.     ProcessorID_I586  = I586
  15.     ProcessorID_R4000 = R4000
  16.     PlatformID_I386 = I386
  17.     PlatformID_Mips = Mips
  18.     STF_PRODUCT        = WINNT    
  19.     STF_USERNAME       = ""       
  20.     STF_INSTALL_MODE   = "CUSTOM" 
  21.     STF_UPDGRADE       = NO       
  22.     STF_NCDETECT       = NO       
  23.     STF_NCOPTION       = ""       
  24.     STF_NCDETCARD      = 99999    
  25.     STF_NC_PARAMS      = {}       
  26.     STF_NC_PNAMES      = {}       
  27.     STF_SRCDIR_KEYED   = ""       
  28.     STF_SRCDIR_USED    = ""       
  29.     STF_SRCDIR_OVERRIDE = ""      
  30.     STF_SRCDIR_WINNT   = ""       
  31.     STF_TEMPLATE_CRITERR = "CRITERR2"
  32.     STF_TEMPLATE_NONCRITERR = "NONCRITERR2"
  33.     STF_INSTALLED_OS = {} ? $(!LIBHANDLE) GetInstalledOSNames
  34.     FatalErrorIndex = 1
  35.     !Exit_Code = 0
  36. [DoAskOemsetupSource]
  37.     read-syms DoAskUpgradeSrcDlgText$(!STF_LANGUAGE)
  38.     shell "subroutn.inf" DoAskSourceEx $($0) $(DlgText)
  39.     Return $($R0) $($R1) $($R2) $($R3)
  40. [Shell Commands]
  41.      set-title "Windows NT Setup"
  42.      Set !G:DebugOutputControl = 0
  43.      LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
  44.      LoadLibrary "y" $(!STF_CWDDIR)ncpa.cpl !NCPA_HANDLE
  45.      Shell "subroutn.inf" ReadSetupHelpIds
  46.      SetHelpFile "setupnt.hlp" $(!MinimumID) $(!MaximumID)
  47.      set-subst LF = "\n"
  48.      StartWait
  49.      read-syms StfVariableSyms
  50.      read-syms StfVariableDetect
  51.      detect StfVariableDetect
  52.      Set !STF_NTPATH = $(!STF_WINDOWSSYSPATH)
  53.      OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\ProductOptions" 33554432 KeyProductOption
  54.      ifstr(i) $(KeyProductOption) != ""
  55.          GetRegValue $(KeyProductOption) "ProductType" ProductTypeList
  56.          set TempProductType = *($(ProductTypeList),4)
  57.          ifstr(i) $(TempProductType) == "winnt"
  58.              set !STF_PRODUCT = WINNT
  59.          else-ifstr(i) $(TempProductType) == "lanmannt"
  60.              set !STF_PRODUCT = LANMANNT
  61.          endif
  62.          CloseRegKey $(KeyProductOptions)
  63.      endif
  64.      Debug-Output "NCPASHEL.INF: STF_SRCDIR is "$(!STF_SRCDIR)
  65.      OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Ncpa\CurrentVersion" 33554432 KeyNcpa
  66.      Set !STF_SRCDIR = ""
  67.      Set !STF_IDW = FALSE
  68.      Ifstr(i) $(KeyNcpa) != ""
  69.          GetRegValue $(KeyNcpa) "IDW" IdwValueList
  70.          Set IdwValue = *($(IdwValueList),4)
  71.          Ifint $(IdwValue) > 0
  72.              Debug-Output "NCPASHEL.INF: IDW Installation"
  73.              Set !STF_IDW = TRUE
  74.          Endif
  75.          CloseRegKey $(KeyNcpa)
  76.      Else
  77.          Debug-Output "NCPASHEL.INF:  COULDN'T OPEN NCPA KEY!"
  78.      Endif
  79.      OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows Nt\CurrentVersion" $(!REG_KEY_READ) KeyNt
  80.      Ifstr(i) $(KeyNt) != ""
  81.          GetRegValue $(KeyNt) "SourcePath" SourcePathValue
  82.          Set !STF_SRCDIR = *($(SourcePathValue),4)
  83.          Debug-Output "NCPASHEL.INF: SourcePath retrieved is "$(!STF_SRCDIR)
  84.          CloseRegKey $(KeyNt)
  85.      Endif
  86.      Ifstr(i) $(!STF_SRCDIR) == ""
  87.        Set !STF_SRCDIR = "A:\"
  88.      Endif
  89.      Set SetupInp = 0
  90.      Set !NTN_InstallPhase = secondary
  91.      OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\Setup" $(!REG_KEY_READ) KeySetup
  92.      Ifstr(i) $(KeySetup) != ""
  93.          GetRegValue $(KeySetup) "SystemSetupInProgress" SetupInpValue
  94.          Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  95.              Set SetupInp = *($(SetupInpValue),4)
  96.              Debug-Output "NCPASHEL.INF: SetupInp = "$(SetupInp)
  97.          Endif
  98.          Ifint $(SetupInp) == 1
  99.              Set !NTN_InstallPhase = primary
  100.              GetRegValue $(KeySetup) "WinntPath" SetupPathValue
  101.              Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  102.                  Set !STF_SRCDIR_WINNT = *($(SetupPathValue),4)
  103.                  Debug-Output "NCPASHEL.INF: STF_SRCDIR_WINNT = "$(!STF_SRCDIR_WINNT)
  104.              Endif
  105.          Endif
  106.          CloseRegKey $(KeySetup)
  107.      Endif
  108.      Debug-Output "NCPASHEL.INF: Setup phase = "$(!NTN_InstallPhase)
  109.    Ifstr(i) $(NTN_InfSection) == BindingsReview
  110.         Goto skipdetection
  111.    Endif
  112.    Ifstr(i) $(NTN_InstallMode) == install
  113.         Goto startdetection
  114.    Endif
  115.    Ifstr(i) $(NTN_InstallMode) == configure
  116.         Goto startdetection
  117.    Endif
  118.    Goto skipdetection
  119. startdetection = +
  120.    Debug-Output "NCPASHEL.INF: Enable netcard detection from NCPA.CPL"
  121.    Shell "NCPARAM.INF" Param_ControlDetection DTSTART
  122. skipdetection = +
  123.      set STF_PROCESSOR = $(ProcessorID_I386)
  124.      ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_I386)
  125.          set STF_PLATFORM = $(PlatformID_I386)
  126.          set SYS      = $(ProcessorID_I386)
  127.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_I486)
  128.          set STF_PLATFORM = $(PlatformID_I386)
  129.          set SYS      = $(ProcessorID_I386)
  130.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_I586)
  131.          set STF_PLATFORM = $(PlatformID_I386)
  132.          set SYS      = $(ProcessorID_I386)
  133.      else-ifstr(i) $(STF_PROCESSOR) == $(ProcessorID_R4000)
  134.          set STF_PLATFORM = $(PlatformID_Mips)
  135.          set SYS      = $(ProcessorID_R4000)
  136.      else
  137.          set STF_PLATFORM = $(PlatformID_I386)
  138.          set SYS      = $(ProcessorID_I386)
  139.      endif
  140.      Ifstr(i) $(!STF_LANGUAGE) != "ENG"    
  141.          Debug-Output "NCPASHEL: Language not set to English; resetting"
  142.          !STF_LANGUAGE = "ENG"
  143.      Endif
  144.      read-syms ProgressCopy$(!STF_LANGUAGE)
  145.     Ifstr(i) $(!NTN_RegBase) == ""
  146.         set !NTN_RegBase = ""
  147.     Endif
  148.     set !NTN_ServiceBase  = "SYSTEM\CurrentControlSet\SERVICES"
  149.     Ifstr(i) $(!NTN_InstallMode) == ""
  150.         Debug-Output "NCPASHEL:!NTN_InstallMode was not defined!"
  151.         set !NTN_InstallMode  = "configure"
  152.     Endif
  153.     Ifstr(i) $(!NTN_SoftwareBase) == ""
  154.         set !NTN_SoftwareBase = "SOFTWARE"
  155.     Endif
  156.     set !NTN_Origination = "ncpa"
  157.     Ifstr(i) $(!NTN_Infname) == ""
  158.         goto fatalnoinfname
  159.     Endif
  160.     Ifstr(i) $(!NTN_InfSection) == ""
  161.         Set !NTN_InfSection = "InstallOption"
  162.     Endif
  163.     ifstr(i) $(!NTN_InstallMode) == "Update"
  164.         Debug-Output "NCPASHEL.INF: Upgrade mode"
  165.         Shell "" DoAskOemsetupSource $(!STF_SRCDIR)
  166.         Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  167.             goto shellerror
  168.         Endif
  169.         ifstr(i) $($R0) == STATUS_SUCCESSFUL
  170.             set !STF_SRCDIR = $($R1)
  171.         else-ifstr(i) $($R0) == STATUS_USERCANCEL
  172.             set Exit_Code = 1
  173.             goto end
  174.         else
  175.             set Exit_Code = 2
  176.             goto end
  177.         endif
  178.         Set !NTN_Infname = $(!STF_SRCDIR)oemsetup.inf
  179.     endif
  180.     Ifstr(i) $(!NTN_InstallMode) == install
  181.         set AddCopy  = YES
  182.         set DoCopy   = YES
  183.         set DoConfig = YES
  184.     Else
  185.         set AddCopy  = NO
  186.         set DoCopy   = NO
  187.         set DoConfig = NO
  188.     Endif
  189.     Debug-Output "NCPASHEL.INF: Shell to "$(!NTN_Infname)
  190.     Shell $(!NTN_Infname) $(!NTN_InfSection) +
  191.          $(!STF_LANGUAGE) $(!NTN_InfOption) +
  192.          $(!STF_SRCDIR) $(AddCopy) $(DoCopy) $(DoConfig)
  193.     Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  194.        Debug-Output "NCPASHEL.INF: SHELL ERROR: "$($ShellCode)
  195.        goto shellerror
  196.     Endif
  197.     Debug-Output "NCPASHEL: INF return: "$($R0)
  198.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  199.         set Exit_Code = 0
  200.     else-ifstr(i) $($R0) == STATUS_USERCANCEL
  201.         set Exit_Code = 1
  202.     else-ifstr(i) $($R0) == STATUS_NO_EFFECT
  203.         set Exit_Code = 3
  204.     else-ifstr(i) $($R0) == STATUS_REBIND
  205.         set Exit_Code = 4
  206.     else-ifstr(i) $($R0) == STATUS_REBOOT
  207.         set Exit_Code = 5
  208.     else
  209.         set Exit_Code = 2
  210.     Endif
  211.     EndWait
  212.     goto end
  213. shellerror = +
  214.    read-syms ShellError$(!$ShellCode)$(!STF_LANGUAGE)
  215.    Debug-Output "NCPASHEL: SHELL ERROR: "$(Error)
  216.    goto fatal
  217. fatalnoinfname = +
  218.    set FatalErrorIndex = 2
  219.    goto fatalmsg
  220. fatalmsg = +
  221.    read-syms FatalError$(FatalErrorIndex)$(!STF_LANGUAGE)
  222.    Debug-Output "NCPASHEL: FATAL ERROR: "$(Error)
  223.    goto fatal
  224. fatal = +
  225.    read-syms FatalDlg$(!STF_LANGUAGE)
  226.    ui start "FatalError"
  227.    goto end
  228. end = +
  229.    Ifstr(i) $(!LIBHANDLE) != ""
  230.        LibraryProcedure DontCare, $(!LIBHANDLE), DeleteAllConnections
  231.    Endif
  232.    Debug-Output "NCPASHEL: NCPASHEL: returning to NCPA"
  233.    goto term
  234. term = +
  235.    Debug-Output "NCPASHEL: Bye."
  236.    exit
  237. [Source Media Descriptions]
  238.     1    = "Windows NT Advanced Server Setup Disk #1"   , TAGFILE = disk1
  239.     2    = "Windows NT Advanced Server Setup Disk #2"   , TAGFILE = disk2
  240.     3    = "Windows NT Advanced Server Setup Disk #3"   , TAGFILE = disk3
  241.     4    = "Windows NT Advanced Server Setup Disk #4"   , TAGFILE = disk4
  242.     5    = "Windows NT Advanced Server Setup Disk #5"   , TAGFILE = disk5
  243.     6    = "Windows NT Advanced Server Setup Disk #6"   , TAGFILE = disk6
  244.     7    = "Windows NT Advanced Server Setup Disk #7"   , TAGFILE = disk7
  245.     8    = "Windows NT Advanced Server Setup Disk #8"   , TAGFILE = disk8
  246.     9    = "Windows NT Advanced Server Setup Disk #9"   , TAGFILE = disk9
  247.     10    = "Windows NT Advanced Server Setup Disk #10"  , TAGFILE = disk10
  248.     11    = "Windows NT Advanced Server Setup Disk #11"  , TAGFILE = disk11
  249.     12    = "Windows NT Advanced Server Setup Disk #12"  , TAGFILE = disk12
  250.     13    = "Windows NT Advanced Server Setup Disk #13"  , TAGFILE = disk13
  251.     14    = "Windows NT Advanced Server Setup Disk #14"  , TAGFILE = disk14
  252.     15    = "Windows NT Advanced Server Setup Disk #15"  , TAGFILE = disk15
  253.     16    = "Windows NT Advanced Server Setup Disk #16"  , TAGFILE = disk16
  254.     17    = "Windows NT Advanced Server Setup Disk #17"  , TAGFILE = disk17
  255.     18    = "Windows NT Advanced Server Setup Disk #18"  , TAGFILE = disk18
  256.     19    = "Windows NT Advanced Server Setup Disk #19"  , TAGFILE = disk19
  257.     20    = "Windows NT Advanced Server Setup Disk #20"  , TAGFILE = disk20
  258.     21    = "Windows NT Advanced Server Setup Disk #21"  , TAGFILE = disk21
  259.     22    = "Windows NT Advanced Server Setup Disk #22"  , TAGFILE = disk22
  260.     23    = "Windows NT Advanced Server Setup Disk #23"  , TAGFILE = disk23
  261.     24    = "Windows NT Advanced Server Setup Disk #24"  , TAGFILE = disk24
  262.     25    = "Windows NT Advanced Server Setup Disk #25"  , TAGFILE = disk25
  263.     26    = "Windows NT Advanced Server Setup Disk #26"  , TAGFILE = disk26
  264.     27    = "Windows NT Advanced Server Setup Disk #27"  , TAGFILE = disk27
  265.     28    = "Windows NT Advanced Server Setup Disk #28"  , TAGFILE = disk28
  266.     29    = "Windows NT Advanced Server Setup Disk #29"  , TAGFILE = disk29
  267. [ProductType]
  268. STF_PRODUCT  = LanmanNT
  269. STF_PLATFORM = I386
  270. [Files-Inf]
  271. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  272. [LanguageID]
  273.    ENG
  274. [LanguageTextENG]
  275.    "English (American)"
  276. [ProgressCopyENG]
  277.     ProCaption   = "Windows NT Networking Setup"
  278.     ProCancel    = "Cancel"
  279.     ProCancelMsg = "Windows NT is not correcly installed.  Are you sure you want "+
  280.                    "to cancel copying files?"
  281.     ProCancelCap = "Setup Message"
  282.     ProText1     = "Copying:"
  283.     ProText2     = "To:"
  284.     PlatformID_I386 = I386
  285.     PlatformID_Mips = Mips
  286. [FatalDlgENG]
  287. STF_MB_TITLE = "Setup Message"
  288. DlgType = "MessageBox"
  289. STF_MB_TEXT  = $(Error)
  290. STF_MB_TYPE  = 1
  291. STF_MB_ICON  = 3
  292. STF_MB_DEF   = 1
  293. [FatalError1ENG]
  294. Error = "Initialization failed"
  295. [FatalError2ENG]
  296. Error = "No INF file name given (NTN_Infname)"
  297. [FatalError3ENG]
  298. Error = "Invocation of INF file "$(!NTN_Infname)" failed"
  299. [ShellError1ENG]
  300. Error = "INF file "$(!NTN_Infname)" does not exist"
  301. [ShellError2ENG]
  302. Error = "INF file "$(!NTN_Infname)" does not have a section named "$(!NTN_InfSection)
  303. [ShellError3ENG]
  304. Error = "INF file "$(!NTN_Infname)", section "$(!NTN_InfSection)" has syntax errors"
  305. [DoAskUpgradeSrcDlgTextENG]
  306.     DlgText        = "Please enter the full path for the upgrade/update "+
  307.                      "OEMSETUP.INF file. Then choose Continue."
  308.  
  309.  
  310.  
  311.