home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 November / pcwk_11_98a.iso / Pelnepl / Outlook / PL / nt4sp3 / i386 / oemnsvnw.srv < prev    next >
INI File  |  1997-06-17  |  52KB  |  1,148 lines

  1. [Identification]
  2.     OptionType = NetService
  3. [Options]
  4.     NWWKSTA
  5. [FileConstants]
  6. UtilityInf          = "UTILITY.INF"
  7. subroutineinf       = "SUBROUTN.INF"
  8. SoftwareType        = "service"
  9. Exit_Code           = 0
  10. NetwareEventDLL     = "%SystemRoot%\System32\nwevent.dll"
  11. Manufacturer        = "Microsoft"
  12. ProductMajorVersion = "4"
  13. ProductMinorVersion = "0"
  14. ProductVersion      = $(ProductMajorVersion)"."$(ProductMinorVersion)
  15. ProductOpSupport    = 132 
  16. ProductNWWKSTAName  = "NWCWorkstation"
  17. ProductNWWKSTAImagePath   = "%SystemRoot%\System32\services.exe"
  18. NetRuleNWWKSTAType  = "nwWsta nwcWorkstation"
  19. NetRuleNWWKSTAClass = {"nwcWorkstation basic"}
  20. NetRuleNWWKSTABindable    = {"nwcWorkstation nwlinkipxTransport non non 100"}
  21. NetRuleNWWKSTAUse   = $(SoftwareType)" no no"
  22. NetRuleNWWKSTABindForm    = """NwcWorkstation"" yes yes container"
  23. ProductNWRDRName    = "NwRdr"
  24. ProductNWRDRImagePath     = "\SystemRoot\System32\drivers\nwrdr.sys"
  25. ProductProviderImagePath = "%SystemRoot%\System32\nwprovau.dll"
  26. ProviderName        = $(ProductNWWKSTAName)
  27. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  28. ParamKeyName    = $(!NTN_ServiceBase)"\"$(Product$(Option)Name)"\Parameters"
  29. LSAKeyName      = "System\CurrentControlSet\Control\LSA"
  30. [GeneralConstants]
  31. from      = ""
  32. to        = ""
  33. ExitCodeOk     = 0
  34. ExitCodeCancel = 1
  35. ExitCodeFatal  = 2
  36. KeyNull         = ""
  37. MAXIMUM_ALLOWED   = 33554432
  38. RegistryErrorIndex = NO_ERROR
  39. KeyProduct      = ""
  40. KeyParameters   = ""
  41. TRUE            = 1
  42. FALSE           = 0
  43. NoTitle            = 0
  44. ExitState   = "Active"
  45. OldVersionExisted = $(FALSE)
  46. DriverPath      = $(!STF_NTPATH)\drivers
  47. [date]
  48.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  49. [DetectDiskSpace]
  50.     VolumeList      = {} ? $(!LIBHANDLE) GetHardDriveLetters
  51.     VolumeFreeList  = {} ? $(!LIBHANDLE) GetHardDriveFreeSpace
  52.     VolumeFSList    = {} ? $(!LIBHANDLE) GetHardDriveFileSystems
  53. [DetectSystemMemory]
  54.     SystemMemory    = "" ? $(!LIBHANDLE) GetMemorySize
  55. [Identify]
  56.     read-syms Identification
  57.     set Status     = STATUS_SUCCESSFUL
  58.     set Identifier = $(OptionType)
  59.     set Media      = #("Source Media Descriptions", 1, 1)
  60.     Return $(Status) $(Identifier) $(Media)
  61. [ReturnOptions]
  62.     set Status        = STATUS_FAILED
  63.     set OptionList     = {}
  64.     set OptionTextList = {}
  65.     set LanguageList = ^(LanguagesSupported, 1)
  66.     Ifcontains(i) $($0) in $(LanguageList)
  67.         goto returnoptions
  68.     else
  69.         set Status = STATUS_NOLANGUAGE
  70.         goto finish_ReturnOptions
  71.     endif
  72. returnoptions = +
  73.     set OptionList     = ^(Options, 1)
  74.     ifstr(i) $(!STF_PRODUCT) == "WINNT"
  75.         set OptionTextList = ^(OptionsWINNTText$($0), 1)
  76.     else
  77.         set OptionTextList = ^(OptionsLANMANNTText$($0), 1)
  78.     endif
  79.     set Status         = STATUS_SUCCESSFUL
  80. finish_ReturnOptions = +
  81.     Return $(Status) $(OptionList) $(OptionTextList)
  82. [InstallOption]
  83.     set Option   = $($1)
  84.     set SrcDir   = $($2)
  85.     set AddCopy  = $($3)
  86.     set DoCopy   = $($4)
  87.     set DoConfig = $($5)
  88.     set LanguageList = ^(LanguagesSupported, 1)
  89.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  90.         Return STATUS_NOLANGUAGE
  91.     endif
  92.     Debug-Output "OEMNSVNW.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
  93.     Debug-Output "OEMNSVNW.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  94.     set-subst LF = "\n"
  95.     set-subst CR = "\r"
  96.     ifstr(i) $(!STF_PRODUCT) == "WINNT"
  97.         read-syms Workstation$($0)
  98.     else
  99.         read-syms Gateway$($0)
  100.     endif
  101.     read-syms GeneralConstants
  102.     read-syms FileConstants
  103.     read-syms DialogConstants$(!STF_LANGUAGE)
  104.     ifstr(i) $(!NTN_Origination) == "NCPA"
  105.         set Continue = $(OK)
  106.     endif
  107.     read-syms FileConstants$(!STF_LANGUAGE)
  108.     detect date
  109.     detect DetectSystemMemory
  110.     detect DetectDiskSpace
  111.     set-title  $(FunctionTitle)
  112.     set to   = Begin
  113.     set from = Begin
  114.     set CommonStatus = STATUS_SUCCESSFUL
  115.     EndWait
  116. Begin = +
  117.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  118.         set OEM_ABANDON_OPTIONS = { $(ProductNWWKSTAName), +
  119.             $(ProductNWRDRName)}
  120.         set StartLabel = removeadapter
  121.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  122.         set StartLabel = UpgradeSoftware
  123.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  124.         set StartLabel = bindingadapter
  125.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  126.         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  127.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  128.             Debug-Output "OEMNSVNW.INF: ShellCode error: cannot get an error string."
  129.             goto ShellCodeError
  130.         endif
  131.         set Error = $($R0)
  132.         set from = end
  133.         set to = end
  134.         goto nonfatalinfo
  135.     else
  136.         set StartLabel = installadapter
  137.         set OEM_ABANDON_OPTIONS = {}
  138.     endif
  139.     set DoWKSTA         = FALSE
  140.     set DoRDR           = FALSE
  141.     set DoNWLINK        = FALSE
  142.     Ifstr(i) $(Option) == NWWKSTA
  143.         set DoWKSTA     = TRUE
  144.         set DoRDR       = TRUE
  145.         set DoNWLINK    = TRUE
  146.     Else-ifstr(i) $(Option) == RDR
  147.         Set DoRDR = TRUE
  148.     Else
  149.         Debug-Output "OEMNSVWK.INF: Unrecognized option"
  150.     Endif
  151.     set from = $(fatal)
  152.     set to = $(fatal)
  153.     goto $(StartLabel)
  154. installadapter = +
  155.     GetDriveInPath NtDrive $(!STF_WINDOWSSYSPATH)
  156.     Shell "" GetFilesSize
  157.     set RequiredSize = $($R0)
  158.     ForListDo $(VolumeList)
  159.           set CurrentVolume = *($(VolumeList), $(#))
  160.           set CurrentVolumeFree  = *($(VolumeFreeList), $(#))
  161.           Ifstr(i) $(CurrentVolume) == $(NtDrive)
  162.               set-mul CurrentVolumeFree = $(CurrentVolumeFree) 1024
  163.               Ifint $(CurrentVolumeFree) < $(RequiredSize)
  164.                   Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(NotEnoughSpace)
  165.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  166.                       goto ShellCodeError
  167.                   endif
  168.                   goto end
  169.               else
  170.                   goto AfterCheckSpace
  171.               endif
  172.           EndIf
  173.     EndForListDo
  174. AfterCheckSpace = +
  175.     Ifstr(i) $(DoCopy) == "YES"
  176.         Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  177.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  178.             Goto ShellCodeError
  179.         Else-Ifstr(i) $($R0) == STATUS_FAILED
  180.             Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  181.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  182.                 goto ShellCodeError
  183.             endif
  184.             set Error = $($R0)
  185.             Goto fatal
  186.         Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  187.             Goto successful
  188.         Endif
  189.         Set SrcDir = $($R1)
  190.     Endif
  191.     set NwlnkName = "NWLINKIPX"
  192.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLINKIPX" $(MAXIMUM_ALLOWED) BS_KeyServices
  193.     Ifstr $(BS_KeyServices) == $(KeyNull)
  194.         set NwlnkName = "NWLNKIPX"
  195.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLNKIPX" $(MAXIMUM_ALLOWED) BS_KeyServices
  196.         Ifstr $(BS_KeyServices) == $(KeyNull)
  197.             Shell "oemnxpip.inf" ReturnOptions $(!STF_LANGUAGE)
  198.             ifstr(i) $($R0) == STATUS_SUCCESSFUL
  199.                 set OldStfSrcDir = $(!STF_SRCDIR_OVERRIDE)
  200.                 set !STF_SRCDIR_OVERRIDE = ""
  201.                 set NwlnkName = *($($R1),1)
  202.                 Shell "oemnxpip.inf" InstallOption $(!STF_LANGUAGE), *($($R1),1),+
  203.                     $(SrcDir), $(AddCopy), "NO", $(DoConfig)
  204.                 set !STF_SRCDIR_OVERRIDE = $(OldStfSrcDir)
  205.             else
  206.                 Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(InstallNWLINKFirst)
  207.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  208.                     goto ShellCodeError
  209.                 endif
  210.                 goto end
  211.             endif
  212.         else
  213.             CloseRegKey $(BS_KeyServices)
  214.         endif
  215.     else
  216.         CloseRegKey $(BS_KeyServices)
  217.     endif
  218.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  219.     Ifstr $(KeyProduct) != $(KeyNull)
  220.         CloseRegKey $(KeyProduct)
  221.         Shell $(UtilityInf), VerExistedDlg, $(Product$(Option)Title),+
  222.             $(ProductVersion)
  223.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  224.             Debug-Output "OEMNSVNW.INF: ShellCode error: cannot get an error string."
  225.             goto ShellCodeError
  226.         endif
  227.         goto end
  228.     endif
  229.     CloseRegKey $(KeyProduct)
  230.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NetwareWorkstation" $(MAXIMUM_ALLOWED) BS_KeyServices
  231.     Ifstr $(BS_KeyServices) == $(KeyNull)
  232.         Shell $(UtilityInf), CreateService, +
  233.             "NetwareWorkstation", +
  234.             $(ProductNWWKSTADisplayName), +
  235.             $(ProductNWWKSTAImagePath), "autoserviceshare", "NetworkProvider", {}, "",+
  236.             $(NetwareEventDLL)
  237.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  238.             Debug-Output "OEMNSVNW.INF: ShellCode error"
  239.             goto ShellCodeError
  240.         endif
  241.         debug-output $($R0)
  242.         set RegistryErrorIndex = $($R0)
  243.         ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  244.             Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(RemoveAndReboot)
  245.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  246.                 goto ShellCodeError
  247.             endif
  248.             goto end
  249.         else
  250.             Shell $(UtilityInf) RemoveService "NetwareWorkstation" "YES"
  251.         endif
  252.     else
  253.         Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(RemoveAndReboot)
  254.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  255.             goto ShellCodeError
  256.         endif
  257.         CloseRegKey $(BS_KeyServices)
  258.         goto end
  259.     endif
  260.     goto nextstep
  261. nextstep = +
  262.     StartWait
  263.     Ifstr(i) $(!NTN_InstallMode) == install
  264.         Ifint $(OldVersionExisted) == $(FALSE)
  265.             goto installproduct
  266.         endif
  267.     endif
  268.     goto writeparameters
  269. installproduct = +
  270.     CloseRegKey $(ParamKeyName)
  271.     ifstr(i) $(!NTN_InstallMode) == "install"
  272.         install "Install-nwcfgdll"
  273.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  274.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  275.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  276.                goto ShellCodeError
  277.            endif
  278.            set Error = $($R0)
  279.            goto fatal
  280.         endif
  281.     endif
  282.     set OEM_ABANDON_ON  = TRUE
  283.     LoadLibrary "nw" $(!STF_CWDDIR)\nwcfg.dll !NWCFG_HANDLE
  284.     Set FLibraryErrCtl = 1
  285.     ifstr(i) $(!NTN_InstallMode) == "install"
  286.         install "Install-Option"
  287.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  288.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  289.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  290.                goto ShellCodeError
  291.            endif
  292.            set Error = $($R0)
  293.            goto fatal
  294.         endif
  295.     endif
  296.     LibraryProcedure Result $(!NWCFG_HANDLE), SetupRegistryForNWCS
  297.     LibraryProcedure Result $(!NWCFG_HANDLE), AddNetwarePrinterProvidor
  298.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\Print\Providers\"$(ProductPrintProviderName) $(MAXIMUM_ALLOWED) PrintProviderKey
  299.     ifstr(i) $(PrintProviderKey) != $(KeyNull)
  300.         SetRegValue $(PrintProviderKey) {"DisplayName",$(NoTitle),$(!REG_VT_SZ),$(ProductPrintProviderName)}
  301.         CloseRegKey $(PrintProviderKey)
  302.     endif
  303.     Set FLibraryErrCtl = 0
  304.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\Print\Providers" $(MAXIMUM_ALLOWED) PrintProviderKey
  305.     Ifstr $(PrintProviderKey) != $(KeyNull)
  306.         GetRegValue $(PrintProviderKey),"Order",OrderInfo
  307.         set OrderList = *($(OrderInfo),4)
  308.         set NewOrderList = {$(ProductPrintProviderName)}
  309.         ForListDo  $(OrderList)
  310.             ifstr(i) $($) != $(ProductPrintProviderName)
  311.                 set NewOrderList = >($(NewOrderList),$($))
  312.             endif
  313.         EndForListDo
  314.         SetRegValue $(PrintProviderKey) {"Order",$(NoTitle),$(!REG_VT_MULTI_SZ),$(NewOrderList)}
  315.         CloseRegKey $(PrintProviderKey)
  316.     endif
  317.     OpenRegKey $(!REG_H_LOCAL) "" $(LSAKeyName) $(MAXIMUM_ALLOWED) LSAKey
  318.     Ifstr $(LSAKey) != $(KeyNull)
  319.         GetRegValue $(LSAKey),"Authentication Packages", PackagesInfo
  320.         set Packages = *($(PackagesInfo), 4)
  321.         ifcontains(i) "nwprovau" in $(Packages)
  322.             debug-output "Authentication Packages already exist."
  323.         else
  324.             ifstr(i) $(Packages) == ""
  325.                 set Packages = {"nwprovau"}
  326.             else
  327.                 set Packages = >($(Packages),"nwprovau")
  328.             endif
  329.             SetRegValue $(LSAKey) {"Authentication Packages",$(NoTitle),$(!REG_VT_MULTI_SZ),$(Packages)}
  330.         endif
  331.         CloseRegKey $(LSAKey)
  332.     endif
  333.     ifstr(i) $(DoWKSTA) == TRUE
  334.         Debug-Output "OEMNSVNW.INF: Install Workstation in registry."
  335.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductNWWKSTAName))
  336.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  337.             $(ProductNWWKSTAName), +
  338.             $(ProductNWWKSTAName), +
  339.             $(ProductNWWKSTADisplayName), $(STF_CONTEXTINFNAME), +
  340.             $(ProductNWWKSTAImagePath), "autoserviceshare", "NetworkProvider", {}, "",+
  341.             $(NetwareEventDLL)
  342.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  343.             Debug-Output "OEMNSVNW.INF: ShellCode error"
  344.             goto ShellCodeError
  345.         endif
  346.         set RegistryErrorIndex = $($R0)
  347.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  348.             EndWait
  349.             Debug-Output "OEMNSVNW.INF: Registry error: add software components"
  350.             CloseRegKey $($R1)
  351.             CloseRegKey $($R2)
  352.             CloseRegKey $($R3)
  353.             CloseRegKey $($R4)
  354.             CloseRegKey $($R5)
  355.             goto fatalregistry
  356.         endif
  357.         Set SoftProductKey      = $($R1)
  358.         Set SoftNetRuleKey      = $($R2)
  359.         Set SoftServiceKey      = $($R3)
  360.         Set SoftParameterKey    = $($R4)
  361.         Set SoftLinkageKey      = $($R5)
  362.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  363.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  364.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  365.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductNWWKSTATitle)},+
  366.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductNWWKSTADescription)},+
  367.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductNWWKSTAName)},+
  368.                            {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}, +
  369.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  370.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  371.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  372.             Debug-Output "OEMNSVNW.INF: ShellCode error."
  373.             goto ShellCodeError
  374.         endif
  375.         set RegistryErrorIndex = $($R0)
  376.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  377.             EndWait
  378.             Debug-Output "OEMNSVNW.INF: registry error: add value list."
  379.             CloseRegKey $(SoftProductKey)
  380.             CloseRegKey $(SoftNetRuleKey)
  381.             CloseRegKey $(SoftServiceKey)
  382.             CloseRegKey $(SoftLinkageKey)
  383.             CloseRegKey $(SoftParameterKey)
  384.             goto fatalregistry
  385.         endif
  386.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleNWWKSTAType)},+
  387.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleNWWKSTAClass)}, +
  388.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleNWWKSTAUse)}, +
  389.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleNWWKSTABindForm)}, +
  390.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleNWWKSTABindable)}, +
  391.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),NWWKSTA}}
  392.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  393.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  394.             Debug-Output "OEMNSVNW.INF: ShellCode error."
  395.             goto ShellCodeError
  396.         endif
  397.         set RegistryErrorIndex = $($R0)
  398.         CloseRegKey $(SoftProductKey)
  399.         CloseRegKey $(SoftNetRuleKey)
  400.         CloseRegKey $(SoftServiceKey)
  401.         Shell "" AddParameterKey $(SoftParameterKey)
  402.         CloseRegKey $(SoftParameterKey)
  403.         CloseRegKey $(SoftLinkageKey)
  404.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  405.             EndWait
  406.             Debug-Output "OEMNSVNW.INF: Registry error: add value list."
  407.             goto fatalregistry
  408.         endif
  409.         Set FLibraryErrCtl = 1
  410.         set FoundAutoExec = TRUE
  411.         set AutoExecName = "autoexec.nt"
  412.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(AutoExecName)
  413.         ifstr(i) $(STATUS) == NO
  414.             set AutoExecName = "autoexec.tmp"
  415.             LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(AutoExecName)
  416.             ifstr(i) $(STATUS) == NO
  417.                 set FoundAutoExec = FALSE
  418.             endif
  419.         endif
  420.         ifstr(i) $(FoundAutoExec) == TRUE
  421.             LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\"$(AutoExecName), $(REM1)$(LF)
  422.             LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\"$(AutoExecName), "lh %SystemRoot%\system32\nw16"$(LF)
  423.             LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\"$(AutoExecName), "lh %SystemRoot%\system32\vwipxspx"$(LF)
  424.             LibraryProcedure Result $(!NWCFG_HANDLE), AppendSzToFile, $(!STF_WINDOWSSYSPATH)"\"$(AutoExecName), $(REM1)$(CR)$(LF)
  425.             LibraryProcedure Result $(!NWCFG_HANDLE), AppendSzToFile, $(!STF_WINDOWSSYSPATH)"\"$(AutoExecName), "lh %SystemRoot%\system32\nw16"$(CR)$(LF)
  426.             LibraryProcedure Result $(!NWCFG_HANDLE), AppendSzToFile, $(!STF_WINDOWSSYSPATH)"\"$(AutoExecName), "lh %SystemRoot%\system32\vwipxspx"$(CR)$(LF)
  427.         endif
  428.         Set FLibraryErrCtl = 0
  429.     endif
  430.     ifstr(i) $(DoNWLINK) == TRUE
  431.         Shell "utility.inf", IncrementRefCount, "Software\Microsoft\"$(NwlnkName)"\CurrentVersion"
  432.     endif
  433.     ifstr(i) $(DoRDR) == TRUE
  434.         Debug-Output "OEMNSVNW.INF: Install Rdr registry"
  435.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductNWRDRName))
  436.         Shell $(UtilityInf), CreateService, $(ProductNWRDRName), +
  437.             $(ProductNWRDRDisplayName), $(ProductNWRDRImagePath), +
  438.             "system", "Network", {}, "", +
  439.             $(NetwareEventDLL)
  440.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  441.             Debug-Output "OEMNSVNW.INF: ShellCode error"
  442.             goto ShellCodeError
  443.         endif
  444.         set RegistryErrorIndex = $($R0)
  445.         set NWRdrServiceKey = $($R1)
  446.         CloseRegKey $($R2)
  447.         CloseRegKey $($R3)
  448.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  449.             EndWait
  450.             Debug-Output "OEMNSVNW.INF: Registry error: add software components"
  451.             goto fatalregistry
  452.         endif
  453.         CreateRegKey $(NWRdrServiceKey) {"Performance",$(NoTitle),GenericClass} "" +
  454.                 $(MAXIMUM_ALLOWED) "" KeyPerformance
  455.         set NewValueList = {{Library,$(NoTitle),$(!REG_VT_SZ),"Perfnw.dll"},+
  456.                            {Open,$(NoTitle),$(!REG_VT_SZ),"OpenNetWarePerformanceData"},+
  457.                            {Collect,$(NoTitle),$(!REG_VT_SZ),"CollectNetWarePerformanceData"},+
  458.                            {Close,$(NoTitle),$(!REG_VT_SZ),"CloseNetWarePerformanceData"}}
  459.         Shell  $(UtilityInf), AddValueList, $(KeyPerformance), $(NewValueList)
  460.         set RegistryErrorIndex = $($R0)
  461.         CloseRegKey $(KeyPerformance)
  462.         CloseRegKey $(NWRdrServiceKey)
  463.         LibraryProcedure Result $(!NWCFG_HANDLE), GetKernelVersion
  464.         ifint *($(Result),3) < 529
  465.             Set FLibraryErrCtl = 1
  466.             LibraryProcedure STATUS $(!NWCFG_HANDLE), lodctr $(!STF_WINDOWSSYSPATH)\nwperf.ini
  467.             Set FLibraryErrCtl = 0
  468.         endif
  469.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  470.             EndWait
  471.             Debug-Output "OEMNSVNW.INF: Registry error: add performance information"
  472.             goto fatalregistry
  473.         endif
  474.         Debug-Output "OEMNSVNW.INF: Add NetworkProvider"
  475.         Shell $(UtilityInf), AddNetworkProvider, $(ProviderName), +
  476.             $(ProductProviderImagePath), $(ProductProviderDisplayName), "nwrdr"
  477.         set RegistryErrorIndex = $($R0)
  478.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  479.             EndWait
  480.             Debug-Output "OEMNSVNW.INF: Registry error: add software components"
  481.             goto fatalregistry
  482.         endif
  483.         OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\NetworkProvider\Order" $(MAXIMUM_ALLOWED) NetProviderKey
  484.         Ifstr $(NetProviderKey) != $(KeyNull)
  485.             GetRegValue $(NetProviderKey),"ProviderOrder",OrderInfo
  486.             set OrderList = *($(OrderInfo),4)
  487.             Split-String $(OrderList), ",", ProviderList
  488.             set NewOrderList = $(ProductNWWKSTAName)
  489.             ForListDo  $(ProviderList)
  490.                 ifstr(i) $($) != ","
  491.                     ifstr(i) $($) != $(ProductNWWKSTAName)
  492.                         set NewOrderList = $(NewOrderList)","$($)
  493.                     endif
  494.                 endif
  495.             EndForListDo
  496.             SetRegValue $(NetProviderKey) {"ProviderOrder",$(NoTitle),$(!REG_VT_SZ),$(NewOrderList)}
  497.             CloseRegKey $(NetProviderKey)
  498.         endif
  499.         Shell "" AddShortName
  500.         Shell $(UtilityInf) AddServerRpcProtocol "ncadg_ipx" "RpcLtScm.Dll"
  501.         Shell $(UtilityInf) AddServerRpcProtocol "ncacn_spx" "RpcLtScm.Dll"
  502.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  503.             Debug-Output "OEMNXPTC.INF: ShellCode error adding RPC procotol"
  504.             goto ShellCodeError
  505.         Endif
  506.         Set RegistryErrorIndex = $($R0)
  507.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  508.             Debug-Output "OEMNXPTC.INF: ERROR adding RPC protocol data"
  509.             EndWait
  510.             goto fatalregistry
  511.         Endif
  512.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProviderName)"\networkprovider" $(MAXIMUM_ALLOWED) ProviderKey
  513.         ifstr(i) $(ProviderKey) != ""
  514.             set NewValueList = {{Class,$(NoTitle),$(!REG_VT_DWORD),11},+
  515.                                 {NWCompatibleAuthentication,$(NoTitle),$(!REG_VT_DWORD),1}}
  516.             Shell $(UtilityInf) AddValueList $(ProviderKey) $(NewValueList)
  517.         endif
  518.         CloseRegKey $(ProviderKey)
  519.         LibraryProcedure Status1, $(!LIBHANDLE), CheckFileExistance, $(!STF_WINDOWSSYSPATH)"\novell.cpl"
  520.         ifstr(i) $(Status1) == "YES"
  521.             LibraryProcedure Status2, $(!LIBHANDLE), RenFile, $(!STF_WINDOWSSYSPATH)"\novell.cpl", $(!STF_WINDOWSSYSPATH)"\novell.bak"
  522.         endif
  523.         OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\WOW" $(MAXIMUM_ALLOWED) WowKey
  524.         ifstr(i) $(WowKey) != ""
  525.             GetRegValue $(WowKey),"KnownDLLS", KnownDLLsInfo
  526.             Split-String *($(KnownDLLsInfo),4), " ", KnownDLLsList
  527.             Ifcontains(i) "netware.drv" not-in $(KnownDLLsList)
  528.                 ifstr(i) *($(KnownDLLsInfo),4) == ""
  529.                     set KnownDLLs = "netware.drv"
  530.                 else
  531.                     set KnownDLLs = *($(KnownDLLsInfo),4)" netware.drv"
  532.                 endif
  533.                 SetRegValue $(WowKey) {"KnownDLLS",$(NoTitle),$(!REG_VT_SZ),$(KnownDLLs)}
  534.             endif
  535.             CloseRegKey $(WowKey)
  536.         endif
  537.         OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\LanmanServer\Parameters" $(MAXIMUM_ALLOWED) ServerParmKey
  538.         ifstr(i) $(ServerParmKey) != ""
  539.             SetRegValue $(ServerParmKey) {"EnableSharedNetDrives",$(NoTitle),$(!REG_VT_DWORD),1}
  540.             CloseRegKey $(ServerParmKey)
  541.         endif
  542.     endif
  543. writeparameters = +
  544.     FreeLibrary $(!NWCFG_HANDLE)
  545.     EndWait
  546.     goto successful
  547. ConfigureBrowser = +
  548.     goto successful
  549. bindingadapter =+
  550.     set Error = "Binding: Sorry, not yet implemented."
  551.     goto fatal
  552. removeadapter = +
  553.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\WOW" $(MAXIMUM_ALLOWED) WowKey
  554.     ifstr(i) $(WowKey) != ""
  555.         GetRegValue $(WowKey),"KnownDLLS", KnownDLLsInfo
  556.         Split-String *($(KnownDLLsInfo),4), " ", KnownDLLsList
  557.         set KnownDLLs = ""
  558.         Ifcontains(i) "netware.drv" in $(KnownDLLsList)
  559.             ForListDo $(KnownDLLsList)
  560.                 ifstr(i) $($) != " "
  561.                     ifstr(i) $($) != "netware.drv"
  562.                         ifstr(i) $(KnownDLLs) == ""
  563.                             set KnownDLLs = $($)
  564.                         else
  565.                             set KnownDLLs = $(KnownDLLs)" "$($)
  566.                         endif
  567.                     endif
  568.                 endif
  569.             EndForListDo
  570.         else
  571.             set KnownDLLs = *($(KnownDLLsInfo),4)
  572.         endif
  573.         SetRegValue $(WowKey) {"KnownDLLS",$(NoTitle),$(!REG_VT_SZ),$(KnownDLLs)}
  574.         CloseRegKey $(WowKey)
  575.     endif
  576.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\LanmanServer\Parameters" $(MAXIMUM_ALLOWED) ServerParmKey
  577.     ifstr(i) $(ServerParmKey) != ""
  578.         SetRegValue $(ServerParmKey) {"EnableSharedNetDrives",$(NoTitle),$(!REG_VT_DWORD),0}
  579.         CloseRegKey $(ServerParmKey)
  580.     endif
  581.     LoadLibrary "nw" $(!STF_CWDDIR)\nwcfg.dll !NWCFG_HANDLE
  582.     Set FLibraryErrCtl = 1
  583.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\Print\Providers" $(MAXIMUM_ALLOWED) PrintProviderKey
  584.     ifstr(i) $(PrintProviderKey) != ""
  585.         GetRegValue $(PrintProviderKey) "Order" OrderInfo
  586.         ifcontains(i) $(OldPrintProviderName) in *($(OrderInfo),4)
  587.             LibraryProcedure Result $(!NWCFG_HANDLE), DeleteNetwarePrinterProvidor $(OldPrintProviderName)
  588.         endif
  589.         ifcontains(i) $(OldPrintProviderName2) in *($(OrderInfo),4)
  590.             LibraryProcedure Result $(!NWCFG_HANDLE), DeleteNetwarePrinterProvidor $(OldPrintProviderName2)
  591.         endif
  592.     endif
  593.     OpenRegKey $(!REG_H_LOCAL) "" "Software\Microsoft\NwSapAgent" $(MAXIMUM_ALLOWED) SapAgentKey
  594.     ifstr(i) $(SapAgentKey) == ""
  595.     else
  596.         CloseRegKey $(SapAgentKey)
  597.     endif
  598.     LibraryProcedure Result $(!NWCFG_HANDLE), DeleteNetwarePrinterProvidor
  599.     Set FLibraryErrCtl = 0
  600.     LibraryProcedure Result $(!NWCFG_HANDLE), GetKernelVersion
  601.     ifint *($(Result),3) < 529
  602.         Set FLibraryErrCtl = 1
  603.         LibraryProcedure STATUS $(!NWCFG_HANDLE), unlodctr nwrdr
  604.         Set FLibraryErrCtl = 0
  605.     endif
  606.     OpenRegKey $(!REG_H_LOCAL) "" $(LSAKeyName) $(MAXIMUM_ALLOWED) LSAKey
  607.     Ifstr $(LSAKey) != $(KeyNull)
  608.         GetRegValue $(LSAKey),"Authentication Packages", PackagesInfo
  609.         set Packages = *($(PackagesInfo), 4)
  610.         ifcontains(i) "nwprovau" not-in $(Packages)
  611.             debug-output "Authentication Packages does not exist.."
  612.         else
  613.             set NewPackages = {}
  614.             ForListDo $(Packages)
  615.                 ifstr(i) $($) != "nwprovau"
  616.                     ifstr(i) $(NewPackages) == {}
  617.                         set NewPackages = {$($)}
  618.                     else
  619.                         set NewPackages = >($(NewPackages),$($))
  620.                     endif
  621.                 endif
  622.             EndForListDo
  623.             SetRegValue $(LSAKey) {"Authentication Packages",$(NoTitle),$(!REG_VT_MULTI_SZ),$(NewPackages)}
  624.         endif
  625.         CloseRegKey $(LSAKey)
  626.     endif
  627.     ifcontains(i) $(ProductNWWKSTAName) in $(OEM_ABANDON_OPTIONS)
  628.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  629.            $(ProductNWWKSTAName)
  630.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  631.            Debug-Output "OEMNSVNW.INF: ShellCode error"
  632.            goto ShellCodeError
  633.         endif
  634.         set RegistryErrorIndex = $($R0)
  635.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  636.            goto fatalregistry
  637.         endif
  638.     endif
  639.     ForListDo  {$(ProductNWRDRName)}
  640.         ifcontains(i) $($) in $(OEM_ABANDON_OPTIONS)
  641.            Shell $(UtilityInf), RemoveService, $($), "YES"
  642.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  643.                Debug-Output "OEMNSVNW.INF: ShellCode error"
  644.                goto ShellCodeError
  645.            endif
  646.            set RegistryErrorIndex = $($R0)
  647.            Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  648.                goto fatalregistry
  649.            endif
  650.         endif
  651.     EndForListDo
  652.     set NwlnkName = "NWLINKIPX"
  653.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLINKIPX" $(MAXIMUM_ALLOWED) BS_KeyServices
  654.     Ifstr $(BS_KeyServices) == $(KeyNull)
  655.         set NwlnkName = "NWLNKIPX"
  656.     endif
  657.     Shell "UTILITY.INF", DecrementRefCount, "Software\Microsoft\"$(NwlnkName)"\CurrentVersion"
  658.     Set FLibraryErrCtl = 1
  659.     set FoundAutoExec = TRUE
  660.     set AutoExecName = "autoexec.nt"
  661.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(AutoExecName)
  662.     ifstr(i) $(STATUS) == NO
  663.         set AutoExecName = "autoexec.tmp"
  664.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(AutoExecName)
  665.         ifstr(i) $(STATUS) == NO
  666.             set FoundAutoExec = FALSE
  667.         endif
  668.     endif
  669.     ifstr(i) $(FoundAutoExec) == TRUE
  670.         LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\"$(AutoExecName), $(REM1)$(LF)
  671.         LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\"$(AutoExecName), "lh %SystemRoot%\system32\nw16"$(LF)
  672.         LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\"$(AutoExecName), "lh %SystemRoot%\system32\vwipxspx"$(LF)
  673.     endif
  674.     Set FLibraryErrCtl = 0
  675.     Shell $(UtilityInf) RemoveNetworkProvider $(ProviderName)
  676.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  677.         Debug-Output "OEMNSVNW.INF: ShellCode error"
  678.         goto ShellCodeError
  679.     endif
  680.     set RegistryErrorIndex = $($R0)
  681.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  682.         goto fatalregistry
  683.     endif
  684.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\NetworkProvider\ShortName" $(MAXIMUM_ALLOWED) ShortNameKey
  685.     ifstr $(ShortNameKey) != $(KeyNull)
  686.          DeleteRegValue $(ShortNameKey) "NW"
  687.     else
  688.         debug-output "something wrong..."
  689.     endif
  690.     Set FLibraryErrCtl = 1
  691.     LibraryProcedure Result $(!NWCFG_HANDLE), CleanupRegistryForNWCS
  692.     Set FLibraryErrCtl = 0
  693.     FreeLibrary $(!NWCFG_HANDLE)
  694.     Install "RestoreFiles"
  695.     Set FLibraryErrCtl = 1
  696.     AddfileToDeleteList $(!STF_WINDOWSSYSPATH)"\nwc.cpl"
  697.     AddfileToDeleteList $(!STF_WINDOWSSYSPATH)"\nwapi32.dll"
  698.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\nwc.cpl"
  699.     LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\nwapi32.dll"
  700.     Set FLibraryErrCtl = 0
  701.     Shell "" RemoveBackupFiles
  702.     goto end
  703. UpgradeSoftware = +
  704.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(SrcDir)"\nwc.2a"
  705.     ifstr(i) $(STATUS) == YES
  706.         Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(UpgradeBetaOnTopOfDaytona)
  707.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  708.             goto ShellCodeError
  709.         endif
  710.         goto end
  711.     endif
  712.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(SrcDir)"\nwc.2b"
  713.     ifstr(i) $(STATUS) == YES
  714.         Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(UpgradeBetaOnTopOfDaytona)
  715.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  716.             goto ShellCodeError
  717.         endif
  718.         goto end
  719.     endif
  720.     Install "Install-Update"
  721.     ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  722.         goto fatal
  723.     endif
  724.     LoadLibrary "nw" $(!STF_CWDDIR)\nwcfg.dll !NWCFG_HANDLE
  725.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  726.     Ifstr $(KeyProduct) != $(KeyNull)
  727.         ifstr(i) $(!STF_NTUPGRADE) != "YES"
  728.             ifstr(i) $(STF_CONTEXTINFNAME) != "oemnsvnw.inf"
  729.                 OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName)"\NetRules" $(MAXIMUM_ALLOWED) KeyNetRules
  730.                 Ifstr $(KeyNetRules) != $(KeyNull)
  731.                     GetRegValue $(KeyNetRules),"InfName", InfNameInfo
  732.                     set !UG_Filename = *($(InfNameInfo), 4)
  733.                     CloseRegKey $(KeyNetRules)
  734.                 else
  735.                     Split-String $(!NTN_Infname), "\", FilenameList
  736.                     QueryListSize ListSize $(FilenameList)
  737.                     set !UG_Filename = *($(FilenameList), $(ListSize))
  738.                 endif
  739.                 install "Install-Update-Inf"
  740.             endif
  741.         endif
  742.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  743.             goto fatal
  744.         endif
  745.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  746.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  747.         SetRegValue $(KeyProduct) {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductNWWKSTADescription)}
  748.         SetRegValue $(KeyProduct) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  749.         CloseRegKey $(KeyProduct)
  750.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Nwrdr\Performance" $(MAXIMUM_ALLOWED) KeyPerformance
  751.         Ifstr $(KeyPerformance) != $(KeyNull)
  752.             CloseRegKey $(KeyPerformance)
  753.             Set FLibraryErrCtl = 1
  754.             ifstr(i) $(!STF_PRODUCT) == "WINNT"
  755.                 LibraryProcedure Result $(!NWCFG_HANDLE), CleanupRegistryForNWCS
  756.             endif
  757.             Set FLibraryErrCtl = 0
  758.             LibraryProcedure Result $(!NWCFG_HANDLE), GetKernelVersion
  759.             ifint *($(Result),3) < 529
  760.                 Set FLibraryErrCtl = 1
  761.                 LibraryProcedure STATUS $(!NWCFG_HANDLE), unlodctr nwrdr
  762.                 LibraryProcedure STATUS $(!NWCFG_HANDLE), lodctr $(!STF_WINDOWSSYSPATH)\nwperf.ini
  763.                 Set FLibraryErrCtl = 0
  764.             endif
  765.         else
  766.             Set FLibraryErrCtl = 1
  767.             LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", $(REM1)$(LF)
  768.             LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", "lh %SystemRoot%\system32\nw16"$(LF)
  769.             LibraryProcedure Result $(!NWCFG_HANDLE), RemoveSzFromFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", "lh %SystemRoot%\system32\vwipxspx"$(LF)
  770.             LibraryProcedure Result $(!NWCFG_HANDLE), AppendSzToFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", $(REM1)$(CR)$(LF)
  771.             LibraryProcedure Result $(!NWCFG_HANDLE), AppendSzToFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", "lh %SystemRoot%\system32\nw16"$(CR)$(LF)
  772.             LibraryProcedure Result $(!NWCFG_HANDLE), AppendSzToFile, $(!STF_WINDOWSSYSPATH)"\autoexec.nt", "lh %SystemRoot%\system32\vwipxspx"$(CR)$(LF)
  773.             Set FLibraryErrCtl = 0
  774.             OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\nwrdr" $(MAXIMUM_ALLOWED) KeyNwrdr
  775.             CreateRegKey $(KeyNwrdr) {"Performance",$(NoTitle),GenericClass} "" +
  776.                     $(MAXIMUM_ALLOWED) "" KeyPerformance
  777.             set NewValueList = {{Library,$(NoTitle),$(!REG_VT_SZ),"Perfnw.dll"},+
  778.                                {Open,$(NoTitle),$(!REG_VT_SZ),"OpenNetWarePerformanceData"},+
  779.                                {Collect,$(NoTitle),$(!REG_VT_SZ),"CollectNetWarePerformanceData"},+
  780.                                {Close,$(NoTitle),$(!REG_VT_SZ),"CloseNetWarePerformanceData"}}
  781.             Shell  $(UtilityInf), AddValueList, $(KeyPerformance), $(NewValueList)
  782.             set RegistryErrorIndex = $($R0)
  783.             CloseRegKey $(KeyPerformance)
  784.             CloseRegKey $(KeyNwrdr)
  785.             LibraryProcedure Result $(!NWCFG_HANDLE), GetKernelVersion
  786.             ifint *($(Result),3) < 529
  787.                 Set FLibraryErrCtl = 1
  788.                 LibraryProcedure STATUS $(!NWCFG_HANDLE), lodctr $(!STF_WINDOWSSYSPATH)\nwperf.ini
  789.                 Set FLibraryErrCtl = 0
  790.             endif
  791.             Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  792.                 EndWait
  793.                 Debug-Output "OEMNSVNW.INF: Registry error: add performance information"
  794.                 goto fatalregistry
  795.             endif
  796.         endif
  797.     endif
  798.     LibraryProcedure Result $(!NWCFG_HANDLE), SetupRegistryForNWCS
  799.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\NWCWorkstation\networkprovider" $(MAXIMUM_ALLOWED) ProviderKey
  800.     ifstr(i) $(ProviderKey) != ""
  801.         SetRegValue $(ProviderKey) {Devicename,$(NoTitle),$(!REG_VT_SZ),"\Device\nwrdr"}
  802.         SetRegValue $(ProviderKey) {Name,$(NoTitle),$(!REG_VT_SZ),$(ProductProviderDisplayName)}
  803.         CloseRegKey $(ProviderKey)
  804.     endif
  805.     LibraryProcedure Status1, $(!LIBHANDLE), CheckFileExistance, $(!STF_WINDOWSSYSPATH)"\novell.cpl"
  806.     ifstr(i) $(Status1) == "YES"
  807.         LibraryProcedure Status2, $(!LIBHANDLE), RenFile, $(!STF_WINDOWSSYSPATH)"\novell.cpl", $(!STF_WINDOWSSYSPATH)"\novell.bak"
  808.     endif
  809.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\WOW" $(MAXIMUM_ALLOWED) WowKey
  810.     ifstr(i) $(WowKey) != ""
  811.         GetRegValue $(WowKey),"KnownDLLS", KnownDLLsInfo
  812.         Split-String *($(KnownDLLsInfo),4), " ", KnownDLLsList
  813.         Ifcontains(i) "netware.drv" not-in $(KnownDLLsList)
  814.             ifstr(i) *($(KnownDLLsInfo),4) == ""
  815.                 set KnownDLLs = "netware.drv"
  816.             else
  817.                 set KnownDLLs = *($(KnownDLLsInfo),4)" netware.drv"
  818.             endif
  819.             SetRegValue $(WowKey) {"KnownDLLS",$(NoTitle),$(!REG_VT_SZ),$(KnownDLLs)}
  820.         endif
  821.         CloseRegKey $(WowKey)
  822.     endif
  823.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\LanmanServer\Parameters" $(MAXIMUM_ALLOWED) ServerParmKey
  824.     ifstr(i) $(ServerParmKey) != ""
  825.         SetRegValue $(ServerParmKey) {"EnableSharedNetDrives",$(NoTitle),$(!REG_VT_DWORD),1}
  826.         CloseRegKey $(ServerParmKey)
  827.     endif
  828.     OpenRegKey $(!REG_H_LOCAL) "" "Software\Microsoft\NWCWorkstation\CurrentVersion" $(MAXIMUM_ALLOWED) CurrentVersionKey
  829.     ifstr(i) $(CurrentVersionKey) != ""
  830.         SetRegValue $(CurrentVersionKey) {"Title",$(NoTitle),$(!REG_VT_SZ),$(NWType)}
  831.         CloseRegKey $(CurrentVersionKey)
  832.     endif
  833.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\NWCWorkstation" $(MAXIMUM_ALLOWED) nwcKey
  834.     ifstr(i) $(nwcKey) != ""
  835.         SetRegValue $(nwcKey) {"DisplayName",$(NoTitle),$(!REG_VT_SZ),$(NWType)}
  836.         SetRegValue $(nwcKey) {"ImagePath",$(NoTitle),$(!REG_VT_EXPAND_SZ),$(ProductNWWKSTAImagePath)}
  837.         CloseRegKey $(nwcKey)
  838.     endif
  839.     Set FLibraryErrCtl = 1
  840.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\Print\Providers" $(MAXIMUM_ALLOWED) PrintProviderKey
  841.     ifstr(i) $(PrintProviderKey) != ""
  842.         GetRegValue $(PrintProviderKey) "Order" OrderInfo
  843.         ifcontains(i) $(OldPrintProviderName) in *($(OrderInfo),4)
  844.             set oldname = $(OldPrintProviderName)
  845.             goto changePrintProvider
  846.         endif
  847.         ifcontains(i) $(OldPrintProviderName2) in *($(OrderInfo),4)
  848.             set oldname = $(OldPrintProviderName2)
  849.             goto changePrintProvider
  850.         endif
  851.         goto nochangePrintProvider
  852. changePrintProvider = +
  853.         DeleteRegKey $(PrintProviderKey) $(oldname)
  854.         OpenRegKey $(PrintProviderKey) "" $(ProductPrintProviderName) $(MAXIMUM_ALLOWED) ProductProviderKey
  855.         ifstr $(ProductProviderKey) == $(KeyNull)
  856.             CreateRegKey $(PrintProviderKey) {$(ProductPrintProviderName),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ProductProviderKey
  857.         endif
  858.         ifstr $(ProductProviderKey) != $(KeyNull)
  859.             SetRegValue $(ProductProviderKey) {"Name",$(NoTitle),$(!REG_VT_SZ),"nwprovau.dll"}
  860.             SetRegValue $(ProductProviderKey) {"DisplayName",$(NoTitle),$(!REG_VT_SZ),$(ProductPrintProviderName)}
  861.         endif
  862.         OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\Print\Providers" $(MAXIMUM_ALLOWED) PrintProviderKey
  863.         Ifstr $(PrintProviderKey) != $(KeyNull)
  864.             GetRegValue $(PrintProviderKey),"Order",OrderInfo
  865.             set OrderList = *($(OrderInfo),4)
  866.             set NewOrderList = {$(ProductPrintProviderName)}
  867.             ForListDo  $(OrderList)
  868.                 ifstr(i) $($) != $(oldname)
  869.                     ifstr(i) $($) != $(ProductPrintProviderName)
  870.                         set NewOrderList = >($(NewOrderList),$($))
  871.                     endif
  872.                 endif
  873.             EndForListDo
  874.             SetRegValue $(PrintProviderKey) {"Order",$(NoTitle),$(!REG_VT_MULTI_SZ),$(NewOrderList)}
  875.             CloseRegKey $(PrintProviderKey)
  876.         endif
  877. nochangePrintProvider = +
  878.     endif
  879.     Set FLibraryErrCtl = 0
  880.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProviderName)"\networkprovider" $(MAXIMUM_ALLOWED) ProviderKey
  881.     ifstr(i) $(ProviderKey) != ""
  882.         set NewValueList = {{Class,$(NoTitle),$(!REG_VT_DWORD),11},+
  883.                             {NWCompatibleAuthentication,$(NoTitle),$(!REG_VT_DWORD),1}}
  884.         Shell $(UtilityInf) AddValueList $(ProviderKey) $(NewValueList)
  885.         CloseRegKey $(ProviderKey)
  886.     endif
  887.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\Print\Providers\"$(ProductPrintProviderName) $(MAXIMUM_ALLOWED) PrintProviderKey
  888.     ifstr(i) $(PrintProviderKey) != $(KeyNull)
  889.         SetRegValue $(PrintProviderKey) {"DisplayName",$(NoTitle),$(!REG_VT_SZ),$(ProductPrintProviderName)}
  890.         CloseRegKey $(PrintProviderKey)
  891.     endif
  892.     Shell "" AddShortName
  893.     Shell $(UtilityInf) AddServerRpcProtocol "ncadg_ipx" "RpcLtScm.Dll"
  894.     Shell $(UtilityInf) AddServerRpcProtocol "ncacn_spx" "RpcLtScm.Dll"
  895.     FreeLibrary $(!NWCFG_HANDLE)
  896.     goto end
  897. successful = +
  898.     goto end
  899. warning = +
  900.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  901.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  902.         goto ShellCodeError
  903.     endif
  904.     ifstr(i) $($R1) == "OK"
  905.         goto $(to)
  906.     else-ifstr(i) $($R1) == "CANCEL"
  907.         goto $(from)
  908.     else
  909.         goto end
  910.     endif
  911. nonfatalinfo = +
  912.     Set CommonStatus = STATUS_USERCANCEL
  913.     Set Severity = STATUS
  914.     goto nonfatalmsg
  915. nonfatal = +
  916.     Set Severity = NONFATAL
  917.     goto nonfatalmsg
  918. nonfatalmsg = +
  919.     ifstr(i) $(Error) == ""
  920.         Set Severity = NONFATAL
  921.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  922.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  923.             goto ShellCodeError
  924.         endif
  925.         set Error = $($R0)
  926.     endif
  927.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  928.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  929.         goto ShellCodeError
  930.     endif
  931.     ifstr(i) $($R1) == "OK"
  932.         goto $(from)
  933.     else
  934.         goto "end"
  935.     endif
  936. fatalregistry = +
  937.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  938.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  939.         goto ShellCodeError
  940.     endif
  941.     set Error = $($R0)
  942.     goto fatal
  943. fatal = +
  944.     ifstr(i) $(Error) == ""
  945.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  946.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  947.             goto ShellCodeError
  948.         endif
  949.         set Error = $($R0)
  950.     endif
  951.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  952.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  953.         goto ShellCodeError
  954.     endif
  955.     goto setfailed
  956. ShellCodeError = +
  957.     set DlgType      = "MessageBox"
  958.     set STF_MB_TITLE = "Error: "$(FunctionTitle)
  959.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  960.     set STF_MB_TYPE  = 1
  961.     set STF_MB_ICON  = 3
  962.     set STF_MB_DEF   = 1
  963.     ui start "Error Message"
  964.     goto setfailed
  965. setfailed = +
  966.     set CommonStatus = STATUS_FAILED
  967.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  968.         set OEM_ABANDON_ON = FALSE
  969.         goto removeadapter
  970.     endif
  971.     goto end
  972. end = +
  973.     goto term
  974. term = +
  975.     Return $(CommonStatus)
  976. [RestoreFiles]                                                              
  977.     AddSectionFilesToCopyList Restore-Oldexe $(!STF_WINDOWSSYSPATH) $(!STF_WINDOWSSYSPATH)         
  978.     AddSectionFilesToCopyList Restore-Oldsys $(!STF_WINDOWSSYSPATH)\drivers $(!STF_WINDOWSSYSPATH)\drivers 
  979.     set !STF_NCPA_FLUSH_COPYLIST = TRUE
  980.     CopyFilesInCopyList
  981.     Exit
  982. [Install-nwcfgdll]
  983.     set STF_VITAL = ""
  984.     ifstr(i) $(AddCopy) == "YES"
  985.         AddSectionFilesToCopyList Files-nwcfgdll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  986.     endif
  987.     ifstr(i) $(DoCopy) == "YES"
  988.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  989.        CopyFilesInCopyList
  990.     endif
  991.     Exit
  992. [Install-Option]
  993.     set STF_VITAL = ""
  994.     ifstr(i) $(AddCopy) == "YES"
  995.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)
  996.         AddSectionFilesToCopyList Files-Drivers $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  997.     endif
  998.     ifstr(i) $(DoCopy) == "YES"
  999.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1000.        CopyFilesInCopyList
  1001.     endif
  1002.     ifstr(i) $(DoConfig) == "YES"
  1003.     endif
  1004.     Exit
  1005. [Install-Update]
  1006.    set STF_VITAL        = ""
  1007.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1008.    AddSectionFilesToCopyList Files-nwcfgdll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1009.    AddSectionFilesToCopyList Files-Drivers $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1010.    ifstr(i) $(DoCopy) == "YES"
  1011.       set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1012.       CopyFilesInCopyList
  1013.    endif
  1014.    Exit
  1015. [AddShortName]
  1016.     read-syms GeneralConstants
  1017.     read-syms FileConstants
  1018.     read-syms FileConstants$(!STF_LANGUAGE)
  1019.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\NetworkProvider" $(MAXIMUM_ALLOWED) NetProviderKey
  1020.     ifstr $(NetProviderKey) != $(KeyNull)
  1021.         OpenRegKey $(NetProviderKey) "" "ShortName" $(MAXIMUM_ALLOWED) ShortNameKey
  1022.         ifstr $(ShortNameKey) == $(KeyNull)
  1023.             CreateRegKey $(NetProviderKey) {"ShortName",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ShortNameKey
  1024.         endif
  1025.         ifstr $(ShortNameKey) != $(KeyNull)
  1026.             SetRegValue $(ShortNameKey) {"NW",$(NoTitle),$(!REG_VT_SZ),$(ProductProviderDisplayName)}
  1027.         endif
  1028.     else
  1029.         debug-output "something wrong..."
  1030.     endif
  1031.     return
  1032. [AddParameterKey]
  1033.    read-syms GeneralConstants
  1034.    set SoftParameterKey = $($0)
  1035.    ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  1036.        shell $(!STF_UNATTENDED) ReadDefaultData $(!STF_UNATTENDED_SECTION)
  1037.        SetRegValue $(SoftParameterKey) {DefaultLocation,$(NoTitle),$(!REG_VT_SZ),$(!DefaultLocation)}
  1038.        SetRegValue $(SoftParameterKey) {DefaultScriptOptions,$(NoTitle),$(!REG_VT_DWORD),$(!DefaultScriptOptions)}
  1039.    endif
  1040.    CreateRegKey $(SoftParameterKey) {"Logon",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" LogonKey
  1041.    CreateRegKey $(SoftParameterKey) {"Option",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" OptionKey
  1042.    Set FLibraryErrCtl = 1
  1043.    LibraryProcedure Result $(!NWCFG_HANDLE), SetEverybodyPermission, $(OptionKey), 2
  1044.    Set FLibraryErrCtl = 0
  1045.    CloseRegKey $(LogonKey)
  1046.    CloseRegKey $(OptionKey)
  1047.    Return
  1048. [GetFilesSize]
  1049.     set FileSizeList = >(^(Files-Drivers,3),^(Files-NWWKSTA,3))
  1050.     set TotalSize = 0
  1051.     ForListDo $(FileSizeList)
  1052.         ForListDo $($)
  1053.             Debug-Output $($)
  1054.             Split-String $($) "=" SplitString
  1055.             set Size = *($(SplitString),3)
  1056.             set-add TotalSize = $(TotalSize) $(Size)
  1057.         EndForListDo
  1058.     EndForListDo
  1059.     set-div SizeInK = $(TotalSize) 1024
  1060.     return $(SizeInK)
  1061. [Install-Update-Inf]
  1062.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1063.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1064.    CopyFilesInCopyList
  1065.    exit
  1066. [RemoveBackupFiles]
  1067.     return
  1068. [Restore-Oldexe]
  1069. [Restore-Oldsys]
  1070. [Source Media Descriptions]
  1071.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  1072. [Signature]
  1073.     FileType = MICROSOFT_FILE
  1074. [GetSignature]
  1075.     read-syms Signature
  1076.     return $(FileType)
  1077. [ProductType]
  1078. STF_PRODUCT  = LanmanNT
  1079. STF_PLATFORM = I386
  1080. [Files-Inf]
  1081. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  1082. [Files-Drivers]
  1083. 1,NWRDR.SYS , SIZE=999
  1084. [Files-nwcfgdll]
  1085. 1,NWAPI32.DLL , SIZE=999
  1086. [Files-NWWKSTA]
  1087. 1,NETWARE.DRV , SIZE=999
  1088. 1,NW16.EXE , SIZE=999
  1089. 1,NWAPI16.DLL , SIZE=999
  1090. 1,NWC.CPL , SIZE=999
  1091. 1,NWEVENT.DLL , SIZE=999
  1092. 1,NWSCRIPT.EXE , SIZE=999
  1093. 1,NWWKS.DLL , SIZE=999
  1094. 1,PERFNW.DLL , SIZE=999
  1095. 1,VWIPXSPX.DLL , SIZE=999
  1096. 1,VWIPXSPX.EXE , SIZE=999
  1097. 1,NWDOCGW.CNT , SIZE=1677, RENAME=nwdoc.cnt
  1098. 1,NWDOCGW.HLP , SIZE=54454, RENAME=nwdoc.hlp
  1099. [LanguagesSupported]
  1100.     ENG
  1101. [WorkstationENG]
  1102.     NWType = "Client Service for NetWare"
  1103.     NWDescription = "Enables this computer to log on to NetWare servers and access their resources."
  1104. [GatewayENG]
  1105.     NWType = "Gateway Service for NetWare"
  1106.     NWDescription = "Enables other Windows NT computers to access NetWare servers without running NetWare Client software."
  1107. [OptionsWINNTTextENG]
  1108.     NWWKSTA       = "Client Service for NetWare"
  1109. [OptionsLANMANNTTextENG]
  1110.     NWWKSTA       = "Gateway (and Client) Services for NetWare"
  1111. [FileConstantsENG]
  1112. NotEnoughSpace = "Out of disk space. Please remove some files before install "$(NWType)"."
  1113. UpgradeBetaOnTopOfDaytona = "You cannot update the beta version of "$(NWType)" over Windows NT 3.51's "$(NWType)"."
  1114. InstallNWLINKFirst = "Please install the NWLINK IPX/SPX Compatible Transport before you install the "$(NWType)"."
  1115. InstallNTWKSTAFirst = "Please install the Windows NT Workstation service before you install the "$(NWType)"."
  1116. RemoveAndReboot    = "Please remove any existing "$(NWType)" component and reboot your machine before installing the latest version of "$(NWType)"."
  1117. UpgradeFirst = "Please install the Windows NT patch before installing the "$(NWType)"."
  1118. ProCaption   = "Windows NT Setup"
  1119. ProCancel    = "Cancel"
  1120. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  1121.                "Are you sure you want to cancel copying files?"
  1122. ProCancelCap = "Network Setup Message"
  1123. ProText1     = "Copying:"
  1124. ProText2     = "To:"
  1125. FunctionTitle   = $(NWType)" Setup"
  1126. ProductNWWKSTADescription         = $(NWDescription)
  1127. ProductNWRDRDescription           = "NetWare Redirector Compatible Service"
  1128. ProviderRDRName                 = "NetWare Compatible Redirector"
  1129. ProductNWWKSTATitle       = $(NWType)
  1130. ProductNWWKSTADisplayName = $(NWType)
  1131. ProductNWRDRDisplayName   = "NetWare Rdr"
  1132. ProductNWRDRTitle         = "NetWare Redirector"
  1133. ProductProviderName = "NetWare Network"
  1134. ProductProviderDisplayName = "NetWare or Compatible Network"
  1135. ProductPrintProviderName = "NetWare or Compatible Network"
  1136. OldPrintProviderName = "Netware(R) Network"
  1137. OldPrintProviderName2 = "NetWare Network"
  1138. REM1 = "REM Install network redirector"
  1139. [DialogConstantsENG]
  1140. Help        = "&Help"
  1141. Exit        = "Cancel"
  1142. OK          = "OK"
  1143. HelpContext = ""
  1144. Continue    = "Continue"
  1145. Cancel      = "Cancel"
  1146. ShellCodeErrorText = "Shell Code Error"
  1147. [FileDependentDlgENG]
  1148.