home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 March / CHIPCD_3_98.iso / software / testsoft / exchange / connect / msmcon / bin / oemsetnt.inf < prev    next >
INI File  |  1997-08-25  |  14KB  |  522 lines

  1. ;
  2. ; Eicon X.PAD installation script
  3. ;
  4.  
  5. [LanguagesSupported]
  6.  
  7.     ENG
  8.  
  9. [Options]
  10.  
  11.     XPAD 
  12.  
  13. [OptionsTextENG]
  14.  
  15.     XPAD = "Eicon Technology X.PAD" 
  16.  
  17. [Identify]
  18.  
  19.     set Status         = STATUS_SUCCESSFUL
  20.     set Identifier     = NetService
  21.     set Media          = #("Source Media Descriptions", 1, 1)
  22.  
  23.     Return $(Status) $(Identifier) $(Media)
  24.  
  25. [ReturnOptions]
  26.  
  27.     set Status         = STATUS_FAILED
  28.     set OptionList     = {}
  29.     set OptionTextList = {}
  30.     set LanguageList   = ^(LanguagesSupported, 1)
  31.  
  32.     Ifcontains(i) $($0) in $(LanguageList)
  33.     set OptionList     = ^(Options, 1)
  34.     set OptionTextList = ^(OptionsText$($0), 1)
  35.     set Status         = STATUS_SUCCESSFUL
  36.     Else
  37.     set Status         = STATUS_NOLANGUAGE
  38.     Endif
  39.  
  40.     Return $(Status) $(OptionList) $(OptionTextList)
  41.  
  42. [FileConstants]
  43.  
  44. ;    WANProgManGroup            = "WAN Services"
  45. ;    WANProgManItem             = "X.PAD Configuration Tool"
  46.  
  47.     UtilityInf                 = "UTILITY.INF"
  48.  
  49.     Manufacturer               = "Eicon"
  50.     SoftwareType               = "Driver"
  51.     ProductMajorVersion        = "3"
  52.     ProductMinorVersion        = "1"
  53.     ProductVersion             = $(ProductMajorVersion)"."$(ProductMinorVersion)
  54.     ProductSoftwareName        = "EcXpad"
  55.     ProductSoftwareTitle       = "Eicon X.PAD Driver"
  56.     ProductSoftwareImagePath   = "\SystemRoot\System32\drivers\ecxpad.sys"
  57.     ProductSoftwareDescription = "Eicon X.PAD Driver"
  58.  
  59. ;    NetRuleSoftwareType        = "ecxpadSys ecxpadDriver"
  60.     NetRuleSoftwareType        = ""
  61.  
  62.     NetRuleSoftwareUse         = $(SoftwareType)
  63.  
  64. ;    NetRuleSoftwareBindForm    = """ecxpadSys"" yes no container"
  65.     NetRuleSoftwareBindForm    = ""
  66. ;    NetRuleSoftwareBindForm    = "ecxpadSys" "ecnbDriver" " yes no container"
  67.  
  68.  
  69.     NetRuleSoftwareClass       = {"ecxpadDriver basic"}
  70.  
  71.  
  72.     ProductSoftwareDescription = "Eicon X.PAD Driver"
  73.     NetEventDLL                = "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\ecxpad.sys"
  74.  
  75.     ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  76.  
  77. [FileConstantsENG]
  78.  
  79.     ProCaption   = "Eicon X.PAD Driver Setup"
  80.     ProCancel    = "Cancel"
  81.     ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  82.            "Are you sure you want to cancel copying files?"
  83.     ProCancelCap = "Network Setup Message"
  84.     ProText1     = "Copying:"
  85.     ProText2     = "To:"
  86.  
  87.  
  88.  
  89. [GeneralConstants]
  90.  
  91.    NoTitle            = 0
  92.    TRUE               = 1
  93.    FALSE              = 0
  94.    MAXIMUM_ALLOWED    = 33554432
  95.  
  96. [date]
  97.  
  98.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  99.  
  100. [FreeSpaceVars]
  101.  
  102.     STF_VolList     = {} ? $(!LIBHANDLE) GetHardDriveLetters
  103.     STF_VolFreeList = {} ? $(!LIBHANDLE) GetHardDriveFreeSpace
  104.  
  105. [InstallOption]
  106.  
  107.     set Option   = $($1)
  108.     set SrcDir   = $($2)
  109.     set AddCopy  = $($3)
  110.     set DoCopy   = $($4)
  111.     set DoConfig = $($5)
  112.     set LanguageList = ^(LanguagesSupported, 1)
  113.  
  114.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  115.     Return STATUS_NOLANGUAGE
  116.     endif
  117.  
  118.     detect date
  119.     read-syms GeneralConstants
  120.     read-syms FileConstants
  121.     read-syms Files-RunList
  122.     set-subst LF = "\n"
  123.  
  124.  
  125.     set Status         = STATUS_UNSUCCESSFUL
  126.  
  127.     ;
  128.     ; Branch on option
  129.     ;
  130.  
  131.     ;
  132.     ; De-install X.PAD
  133.     ;
  134.     Ifstr(i)      $(!NTN_InstallMode) == deinstall
  135.  
  136. ;       Debug-Msg "InstallOption -DEINSTALL"
  137.  
  138.     ;
  139.     ; Stop the driver so we can delete it
  140.     ;
  141.     ;RunProgram ExitCode "" ""  $(!STF_WINDOWSSYSPATH)\cmd.exe /c $(!STF_WINDOWSSYSPATH)\net.exe stop ecxpad
  142.  
  143.     ;
  144.     ; Remove files - NOTE: if driver running, stop it
  145.     ;
  146.     install LoadSetupLibrary
  147.     install "DeInstall-Option"
  148.     install FreeSetupLibrary
  149.  
  150.     ;
  151.     ; Delete registry Keys
  152.     ;
  153.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  154.           $(ProductSoftwareName)
  155.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  156.         Debug-Msg "ShellCode error"
  157. ;           goto ShellCodeError
  158. Return $(Status) 
  159.     endif
  160.  
  161.     set RegistryErrorIndex = $($R0)
  162.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  163.         Debug-Msg "registry remove error"
  164. ;           goto fatalregistry
  165. Return $(Status) 
  166.     endif
  167.  
  168.     set Status         = STATUS_SUCCESSFUL
  169.  
  170.  
  171.     ;
  172.     ; Update X.PAD
  173.     ;
  174.     else-Ifstr(i) $(!NTN_InstallMode) == update
  175.  
  176. ;       Debug-Msg "InstallOption -UPDATE"
  177.  
  178.     ;
  179.     ; Stop the driver so we can overwrite it
  180.     ;
  181.     ;RunProgram ExitCode "" ""  $(!STF_WINDOWSSYSPATH)\cmd.exe /c $(!STF_WINDOWSSYSPATH)\net.exe stop ecxpad
  182.  
  183.     ;
  184.     ; Copy files
  185.     ;
  186.     read-syms FileConstants$(!STF_LANGUAGE)
  187.     install "Install-Option"
  188.     ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  189.         Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  190.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  191. ;                goto ShellCodeError
  192. Return $(Status) 
  193.         endif
  194.         set Error = $($R0)
  195. ;           goto fatal
  196. Return $(Status) 
  197.     endif
  198.  
  199.  
  200.     ;
  201.     ; Configure X.PAD
  202.     ;
  203.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  204.  
  205. ;       Debug-Msg "InstallOption -CONFIG"
  206.  
  207.     ;
  208.     ; Run config program
  209.     ;
  210.     RunProgram ExitCode "" "" $(PADCNFG) "NCPA" 
  211.     ifint $(ExitCode) == 1
  212.         set Status         = STATUS_SUCCESSFUL
  213. ;           Debug-Msg "CHANGES MADE"
  214.     else
  215.         ifint $(ExitCode) == 0
  216.         set Status         = STATUS_NO_EFFECT
  217. ;               Debug-Msg "NO CHANGES MADE"
  218.         else
  219. ;               Debug-Msg "Not able to run"
  220.         endif
  221.     endif
  222.  
  223.  
  224.     ;
  225.     ; Install X.PAD
  226.     ;
  227.     else-Ifstr(i) $(!NTN_InstallMode) == install
  228.  
  229.  ;      Debug-Msg "InstallOption -INSTALL"
  230.  
  231.     ;
  232.     ; Check if already installed
  233.     ;
  234.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  235.     Ifstr $(KeyProduct) != $(KeyNull)
  236.         CloseRegKey $(KeyProduct)
  237.         Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  238.           $(ProductVersion)
  239.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  240.         Debug-Msg "ShellCode error: cannot get an error string."
  241. ;                    goto ShellCodeError
  242. Return $(Status) 
  243.  
  244.         endif
  245.         ifstr(i) $($R1) != "OK"
  246. ;                   goto end
  247. Return $(Status) 
  248.  
  249.         endif
  250.         Return $(Status) 
  251.     endif
  252.  
  253.         ;
  254.         ; Check that there's enough disk space on the target drive.
  255.         ;
  256.         detect FreeSpaceVars
  257.         GetDriveInPath WANDrive $(!STF_WINDOWSSYSPATH)
  258.         ForListDo $(STF_VolList)
  259.            ifstr(i) $($) == $(WANDrive)
  260.                set VolSpaceFree = *( $(STF_VolFreeList), $(#) )
  261.            endif
  262.         EndForListDo
  263.         ifint $(VolSpaceFree) < 1
  264.            shell $(!STF_WINDOWSSYSPATH)"\SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) STATUS +
  265.                "Not enough room for the Eicon X.PAD Service on drive "+
  266.                $(WANDrive)" (".5") megs needed, "+
  267.                $(VolSpaceFree)" available)."$(!LF)$(!LF)
  268.            Return $(Status) 
  269.         endif
  270.  
  271.  
  272.  
  273.     ;
  274.     ; Not installed, copy files
  275.     ;
  276.     read-syms FileConstants$(!STF_LANGUAGE)
  277.     install "Install-Option"
  278.     ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  279.         Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  280.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  281. ;                goto ShellCodeError
  282. Return $(Status) 
  283.         endif
  284.         set Error = $($R0)
  285. ;           goto fatal
  286. Return $(Status) 
  287.     endif
  288.  
  289.     ;
  290.     ; Create registry Keys + values
  291.     ;
  292.     Shell $(UtilityInf), AddSoftwareComponent,+
  293.         $(Manufacturer), +
  294.         $(ProductSoftwareName), +
  295.         $(ProductSoftwareName), +
  296.         $(ProductSoftwareTitle), +
  297.         $(STF_CONTEXTINFNAME), +
  298.         $(ProductSoftwareImagePath),+
  299.         "kernelautostart", +
  300.         "Extended Base", +
  301.         {"Ecnb"},+
  302.         "",+
  303.         $(NetEventDLL)
  304.     Set OEM_ABANDON_SOFTWARE = TRUE
  305.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  306.         Debug-Msg "ShellCode error"
  307.     else
  308.         set RegistryErrorIndex = $($R0)
  309.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  310.         EndWait
  311.         Debug-Msg "Registry error: add software components-1"
  312.         CloseRegKey $($R1)
  313.         CloseRegKey $($R2)
  314.         CloseRegKey $($R3)
  315.         CloseRegKey $($R4)
  316.         CloseRegKey $($R5)
  317.         else
  318.         set SoftProductKey      = $($R1)
  319.         Set SoftNetRuleKey      = $($R2)
  320.         Set SoftServiceKey      = $($R3)
  321.         Set SoftParameterKey    = $($R4)
  322.         Set SoftLinkageKey      = $($R5)
  323.         set NewValueList        = +
  324.             {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  325.             {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  326.             {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  327.             {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  328.             {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  329.             {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  330.             {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  331.  
  332.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  333.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  334.             Debug-Msg "ShellCode error."
  335.         else
  336.             set RegistryErrorIndex = $($R0)
  337.             Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  338.             EndWait
  339.             Debug-Msg "Resgitry error: add value list."
  340.             CloseRegKey $(SoftProductKey)
  341.             CloseRegKey $(SoftNetRuleKey)
  342.             CloseRegKey $(SoftServiceKey)
  343.             CloseRegKey $(SoftParameterKey)
  344.             CloseRegKey $(SoftLinkageKey)
  345.             else
  346.             set NewValueList = +
  347.                 {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  348.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  349.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  350.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  351.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  352.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  353.             Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  354.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  355.                 Debug-Msg "ShellCode error."
  356.             else
  357.                 set RegistryErrorIndex = $($R0)
  358.                 CloseRegKey $(SoftProductKey)
  359.                 CloseRegKey $(SoftNetRuleKey)
  360.                 CloseRegKey $(SoftServiceKey)
  361.                 CloseRegKey $(SoftParameterKey)
  362.                 CloseRegKey $(SoftLinkageKey)
  363.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  364.                 EndWait
  365.                 Debug-Msg "Resgitry error: add value list."
  366.                 endif
  367.             endif
  368.  
  369.             endif
  370.  
  371.         endif
  372.  
  373.         endif
  374.  
  375.     endif
  376.  
  377.  
  378.     ;
  379.     ; Run config program
  380.     ;
  381.     RunProgram ExitCode "" "" $(PADCNFG) "NCPA"
  382.     ifint $(ExitCode) == 1
  383.         set Status         = STATUS_SUCCESSFUL
  384.     else
  385.         ifint $(ExitCode) == 0
  386.               set Status         = STATUS_SUCCESSFUL
  387.  
  388.           Shell $(!STF_WINDOWSSYSPATH)"\subroutn.inf" +
  389.                     SetupMessage $(!STF_LANGUAGE) +
  390.                     WARNING +
  391.                     $(!LF)"No X.PAD COM Ports were defined."$(!LF)$(!LF)+
  392.                     "The X.PAD driver will not load."$(!LF)+
  393.                     "Please select Configure and add"$(!LF)+
  394.                     "at least 1 X.PAD COM port in order for"$(!LF)+
  395.                     "the driver to load."$(!LF)
  396.  
  397.         else
  398. ;               Debug-Msg "Not able to run"
  399.         endif
  400.  
  401.     endif
  402.  
  403.     endif
  404.  
  405.  
  406.     Return $(Status) 
  407.  
  408.  
  409.  
  410. [Install-Option]
  411.  
  412.     ifstr(i) $(AddCopy) == "YES"
  413.     AddSectionFilesToCopyList Files-Driver $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  414.     AddSectionFilesToCopyList Files-Eicon  $(SrcDir) $(!STF_WINDOWSSYSPATH)
  415.     endif
  416.  
  417.     ifstr(i) $(DoCopy) == "YES"
  418.  
  419.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  420.  
  421.        ;
  422.        ; Copy files
  423.        ;
  424.        CopyFilesInCopyList
  425.  
  426.        ;
  427.        ; Add icon to group
  428.        ;
  429. ;       CreateCommonProgmanItem  $(WANProgManGroup) $(WANProgManItem) +
  430. ;                $(PADCNFG) +
  431. ;                "" 0
  432.  
  433.     endif
  434.  
  435.     exit
  436.  
  437.  
  438. [DeInstall-Option]
  439.  
  440.     ;
  441.     ; Remove files
  442.     ;
  443.     set RemoveList = {}
  444.     set RemoveList = >($(RemoveList), #(Files-RemoveList, PADDRVR,    1))
  445.     set RemoveList = >($(RemoveList), #(Files-RemoveList, PADCNFG,    1))
  446.     set RemoveList = >($(RemoveList), #(Files-RemoveList, PADCNFGHLP, 1))
  447.     set RemoveList = >($(RemoveList), #(Files-RemoveList, PADFR,      1))
  448.     set RemoveList = >($(RemoveList), #(Files-RemoveList, PADEN,      1))
  449.  
  450.     ForListDo $(RemoveList)
  451. ;       Debug-Msg "Removing "$($)
  452.     LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  453. ;       Debug-Msg "Status is "$(Status)
  454.     EndForListDo
  455.  
  456.  
  457.     ;
  458.     ; Remove icon from group
  459.     ;
  460. ;    RemoveCommonProgmanItem  $(WANProgManGroup) $(WANProgManItem)
  461.  
  462.  
  463.     ;
  464.     ; Remove the inf file residing on the system
  465.     ;
  466.     OpenRegKey $(!REG_H_LOCAL), "", +
  467.            "SOFTWARE\Eicon\EcXpad\CurrentVersion\NetRules", +
  468.            $(!REG_KEY_READ), KeyCurVer
  469.  
  470.     ifstr(i) $(KeyCurVer) != $(KeyNull)
  471.        set WanInf = ""
  472.        GetRegValue $(KeyCurVer) "InfName" WanInf
  473.        CloseRegKey $(KeyCurVer)
  474.        ifstr(i) $(WanInf) != ""
  475.       set WanInfName = *($(WanInf),4)
  476.       LibraryProcedure Status , $(!LIBHANDLE), DelFile $(WanInfName)
  477.        endif
  478.     endif
  479.  
  480.  
  481.     exit
  482.  
  483. [LoadSetupLibrary]
  484.  
  485.     set !LIBHANDLE = ""
  486.     LoadLibrary "x" $(!STF_WINDOWSSYSPATH)\setupdll.dll !LIBHANDLE
  487.     exit
  488.  
  489. [FreeSetupLibrary]
  490.  
  491.     FreeLibrary $(!LIBHANDLE)
  492.     set !LIBHANDLE = ""
  493.     exit
  494.  
  495.  
  496. [Source Media Descriptions]
  497.  
  498.     1  = "Eicon X.PAD Windows NT Setup Disk", TAGFILE = xpadisk1
  499.  
  500. [Files-RunList]
  501.  
  502.     PADCNFG      = $(!STF_WINDOWSSYSPATH)\xpadcnfg.exe
  503.  
  504. [Files-RemoveList]
  505.  
  506.     PADDRVR     = $(!STF_WINDOWSSYSPATH)\drivers\ecxpad.sys
  507.     PADCNFG     = $(!STF_WINDOWSSYSPATH)\xpadcnfg.exe
  508.     PADCNFGHLP  = $(!STF_WINDOWSSYSPATH)\xpadcnfg.hlp
  509.     PADFR       = $(!STF_WINDOWSSYSPATH)\ecxpad.fr
  510.     PADEN       = $(!STF_WINDOWSSYSPATH)\ecxpad.en
  511.  
  512. [Files-Driver]
  513.  
  514.     1, ecxpad.sys,  SIZE=100000
  515.  
  516. [Files-Eicon]
  517.  
  518.     1, xpadcnfg.exe, SIZE=50000
  519.     1, xpadcnfg.hlp, SIZE=150000
  520.     1, ecxpad.fr,    SIZE=5000
  521.     1, ecxpad.en,    SIZE=5000
  522.