;*********************************************************************** ; ; OEMSETNT.INF Rev:SX00381-C00 ; ; Interphase 5535/5536 RAS SUPPORT ; ; SETUP INF file. ; ; Version 1.11.000 20/10/1998 ; ; History: ; TSE 12-JUN-1997 Create (Copy from V5) ; TSE 19-NOV-1997 Add Help Files ; TSE 21-NOV-1997 Rename Product ; TSE 02-DEC-1997 Remove Adpater if Synsys ; already uninstalled ; TSE 24-Jun-1998 Install with Network,WAD rep BASE ; TSE 25-Aug-1998 DM Support SYNISDN/SYNDM ; TSE 20-Oct-1998 IPHWAN ; ;*********************************************************************** [Identification] OptionType = NetAdapter ;*********************************************************************** ; ;*********************************************************************** [Options] IPHISDN IPHDM ;*********************************************************************** ; ;*********************************************************************** [FileConstants] ; ; File names, etc. ; UtilityInf = "UTILITY.INF" OtherInf = "OTHER.INF" ParamInf = "NCPARAM.INF" subroutineinf = "SUBROUTN.INF" InstallProg = "SETUP.EXE" InstallInf = "SETUP.INF" SoftwareType = "driver" DllName = "CNDISWAN.DLL" SWAInfName = "OEMNADW6.INF" DllMajVersion = "2" DllCurVersion = "" DllMajCurVersion = "" Exit_Code = 0 InstallSynSYS = 1 ; ; Product Info ; Manufacturer = "Interphase" ProductMajorVersion = "1" ProductMinorVersion = "0" ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion) ; ; Language ; NLSKeyName = "SYSTEM\CurrentControlSet\Control\Nls\Language" UserKeyLang = "Control Panel\International" LANG_FRENCH = "0C" ; ; EventLog Message File ; NetEventDLL = "%SystemRoot%\System32\netevent.dll" IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll" ; ; Définitions driver carte SYNSYS ; CardDriverName = "SynSYS" SynOSDriverName = "SynSV6" CardDriverINF = "BASE.INF" SldInstallPath = "BASE" CardDriverKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(CardDriverName)"\CurrentVersion" CardDriverPath = "" ; Répertoire d'install de SynSYS ; ; Registry Key ; ; ProductOpSupport Win V4.xx ; 0x80 Présence liste / 0x04 [Supprimer] /0x02 [Propriétés] /0x01 [Mettre à jour] ; ProductOpSupport = 134 ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"+ $(ProductSoftwareName)"\CurrentVersion" ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)+ "\Parameters" EventKeyName = $(!NTN_ServiceBase)"\EventLog\System" !NetworkCardKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards" [FileConstantsIPHISDN] ; ; Software ; ProductSoftwareName = "IPHISDN" ProductPath = $(!STF_WINDOWSSYSPATH)\drivers ProductSoftwareImagePath = "\SystemRoot\System32\drivers\IPHISDN.sys" NetRuleSoftwareType = "IPHISDNSys IPHISDNDriver" NetRuleSoftwareUse = $(SoftwareType) NetRuleSoftwareBindForm = """IPHISDNSys"" yes no container" NetRuleSoftwareClass = {"IPHISDNDriver basic"} NetRuleSoftwareBindable = {"IPHISDNDriver IPHISDNAdapter non exclusive 100"} ; ; Hardware ; ProductHardwareName = "IPHISDN" NetRuleHardwareBindForm = " yes yes container" NetRuleHardwareIPHISDNType = "IPHISDN IPHISDNAdapter" NetRuleHardwareIPHISDNClass = {"IPHISDNAdapter basic"} BindableIPHISDNTxt = {"IPHISDNDriver IPHISDNAdapter non exclusive 100"} ; ; TAPI ; DeviceMap = "HARDWARE\DEVICEMAP" TapiDevices = "TAPI DEVICES" TapiDeviceKey = $(ProductHardwareName) TapiMediaType = "ISDN" [FileConstantsIPHDM] ; ; Software ; ProductSoftwareName = "IPHDM" ProductPath = $(!STF_WINDOWSSYSPATH)\drivers ProductSoftwareImagePath = "\SystemRoot\System32\drivers\IPHDM.sys" NetRuleSoftwareType = "IPHDMSys IPHDMDriver" NetRuleSoftwareUse = $(SoftwareType) NetRuleSoftwareBindForm = """IPHDMSys"" yes no container" NetRuleSoftwareClass = {"IPHDMDriver basic"} NetRuleSoftwareBindable = {"IPHDMDriver IPHDMAdapter non exclusive 100"} ; ; Hardware ; ProductHardwareName = "IPHDM" NetRuleHardwareBindForm = " yes yes container" NetRuleHardwareIPHDMType = "IPHDM IPHDMAdapter" NetRuleHardwareIPHDMClass = {"IPHDMAdapter basic"} BindableIPHDMTxt = {"IPHDMDriver IPHDMAdapter non exclusive 100"} ; ; TAPI ; DeviceMap = "HARDWARE\DEVICEMAP" TapiDevices = "TAPI DEVICES" TapiDeviceKey = $(ProductHardwareName) TapiMediaType = "DM" ;*********************************************************************** ; ;*********************************************************************** [GeneralConstants] from = "" to = "" ExitCodeOk = 0 ExitCodeCancel = 1 ExitCodeFatal = 2 KeyNull = "" MAXIMUM_ALLOWED = 33554432 RegistryErrorIndex = NO_ERROR KeyProduct = "" KeyParameters = "" TRUE = 1 FALSE = 0 NoTitle = 0 ExitState = "Active" OldVersionExisted = $(FALSE) DriverPath = $(!STF_NTPATH)\drivers TraceMode = 0 HexChars = "abcdefABCDEF0123456789" ERROR_SUCCESS = 0 ERROR_CANCELLED = 1223 ;*********************************************************************** ; ;*********************************************************************** [Date] Now = {} ? $(!LIBHANDLE) GetSystemDate ;--------------------------------------------------------------------------- ; ; Lecture des variables à partir de la DLL OEMSWA.DLL ; ;--------------------------------------------------------------------------- [InitOemSwaDll] ; AddAdapterOk = "0" ? $(hOemSwaDll) AddAdpt $(TapiMediaType) ;*********************************************************************** ; ;*********************************************************************** [Identify] Read-Syms Identification set Status = STATUS_SUCCESSFUL set Identifier = $(OptionType) set Media = #("Source Media Descriptions", 1, 1) Return $(Status) $(Identifier) $(Media) ;----------------------------------------------------------------------- ; Trace ; ------------------ ; Fonction de trace dans une Message Box ; ; ENTREE : $($0): 1er Message à afficher ; $($1): 2ème Message à afficher ; ; SORTIE: ; ;----------------------------------------------------------------------- [Trace] read-syms GeneralConstants ifstr $(TraceMode) == $(TRUE) shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" "... TRACE ..."+ $(!LF)$(!LF)$($0)$(!LF)$(!LF)$($1) endif return ;----------------------------------------------------------------------- ; FillPathEnd ; ------------------ ; Ajout d'un caractère \ en fin de Path si non déjà présent ; ; ENTREE : $($0): Chaine à analiser ; ; ; SORTIE: $($R0) Chaine complétée ; ;----------------------------------------------------------------------- [FillPathEnd] set FillPath = $($0) set FillList = {} set ListSize = "0" Split-String $(FillPath) "\" FillList QueryListSize ListSize $(FillList) ifstr *($(FillList),$(ListSize)) != "\" return $($0)"\" else return $($0) endif ;----------------------------------------------------------------------- ; GetUserLanguage ; --------------- ; Recherche de la langue en cours pour l'utilisateur ; ; ENTREE : $($0): Language to use ; ; ; SORTIE: ; ;----------------------------------------------------------------------- [GetUserLanguage] ; Par défaut langage courant set !USER_LANGUAGE = $($0) Read-Syms GeneralConstants Read-Syms FileConstants OpenRegKey $(!REG_H_CUSER) "" $(UserKeyLang) $(MAXIMUM_ALLOWED) KeyUserLang ifstr $(KeyUserLang) != $(KeyNull) ; ; Lecture code langue ; GetRegValue $(KeyUserLang),"Locale",LocaleLang ifint $(RegLastError) == $(!REG_ERROR_SUCCESS) Split-String *($(LocaleLang),4) $(HexChars) LocaleChars set UserLang = *($(LocaleChars),7)*($(LocaleChars),8) ifstr(i) $(UserLang) == $(LANG_FRENCH) set !USER_LANGUAGE = "FRA" endif endif CloseRegKey $(KeyUserLang) endif return ;----------------------------------------------------------------------- ; IsNetcardInstalled ; ------------------ ; Recherche si une carte réseau est installée ; ; ENTREE : ; ; ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL ; STATUS_FAILED ; $($R1): TRUE / FALSE ; ;----------------------------------------------------------------------- [IsNetcardInstalled] Set Status = STATUS_FAILED Set fNetcardInstalled = FALSE Set KeyNull = "" set NetworkCardKey = $(KeyNull) OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) NetworkCardKey Ifstr(i) $(NetworkCardKey) != $(KeyNull) set NetcardsList = {} EnumRegKey $(NetworkCardKey) NetcardsList Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS) Debug-Output "IsNetcardInstalled: EnumRegKey failed." goto IsNetcardInstalledEnd endif ForListDo $(NetcardsList) set KeyName = *($($),1) set Card = $(KeyNull) OpenRegKey $(NetworkCardKey) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card ifstr $(Card) == $(KeyNull) Debug-Output "IsNetcardInstalled: could not open netcard key "$(KeyName) else GetRegValue $(Card), "ProductName" ProductNameInfo Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS) Debug-Output "IsNetcardInstalled: ProductName not found." else set CardProductName = *($(ProductNameInfo), 4) Debug-Output "IsNetcardInstalled: ProductName. "$(CardProductName) ifstr(i) $(CardProductName) != "NdisWan" ifstr(i) $(CardProductName) != "NdisWanDialin" ifstr(i) $(CardProductName) != "NdisWanDialout" ifstr(i) $(CardProductName) != "NdisWanDialinIp" ifstr(i) $(CardProductName) != "NdisWanDialoutIp" ifstr(i) $(CardProductName) != "NdisWanDialinoutIpx" ifstr(i) $(CardProductName) != "AsyncMac" ifstr(i) $(CardProductName) != "PCIMAC" ifstr(i) $(CardProductName) != "SYNWAN" ifstr(i) $(CardProductName) != "IPHISDN" ifstr(i) $(CardProductName) != "IPHDM" Debug-Output "found installed netcard" set fNetcardInstalled = TRUE set Status = STATUS_SUCCESSFUL CloseRegKey $(Card) goto IsNetcardInstalledEnd endif endif endif endif endif endif endif endif endif endif endif endif CloseRegKey $(Card) endif EndForListDo set Status = STATUS_SUCCESSFUL else Debug-Output "IsNetcardInstalled: failed to open "$(!NetworkCardKeyName) endif IsNetcardInstalledEnd =+ ifstr(i) $(NetworkCardKey) != $(KeyNull) CloseRegKey $(NetworkCardKey) endif Return $(Status) $(fNetcardInstalled) ;------------------------------------------------------------------------ ; 2. ReturnOptions: ; ; DESCRIPTION: To return the option list supported by this INF and the ; localised text list representing the options. ; ; ; INPUT: $($0): Language used. ( ENG | FRA | ... ) ; ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL | ; STATUS_NOLANGUAGE ; STATUS_FAILED ; STATUS_NOTSUPPORTED ; ; $($R1): Option List ; $($R2): Option Text List ;------------------------------------------------------------------------ [ReturnOptions] set Status = STATUS_FAILED set OptionList = {} set OptionTextList = {} set LanguageList = ^(LanguagesSupported, 1) IfContains(i) $($0) not-in $(LanguageList) set Status = STATUS_NOLANGUAGE goto ExitReturnOptions endif ; ; Détection langage réel ; shell "" GetUserLanguage $($0) SetOptions = + set OptionList = ^(Options, 1) set OptionTextList = ^(OptionsText$(!USER_LANGUAGE),1) set Status = STATUS_SUCCESSFUL ExitReturnOptions = + Return $(Status) $(OptionList) $(OptionTextList) ;----------------------------------------------------------------------- ; InstallLinkDriver ; ----------------- ; Installation ou désinstallation du driver SynSYS ; ; ENTREE : $($0): Language to use ; $($1): SrcDir ; $($2): "INSTALL" ou "REMOVE" ; ; ; SORTIE: $($R0): STATUS: STATUS_SUCCESSFUL Installation OK ; STATUS_FAILED Erreur d'install ; STATUS_USERCANCEL Arrêt utilisateur ; STATUS_SHELL_ERROR Erreur de Shell ; $($R1): SrcDir ; ;----------------------------------------------------------------------- [InstallLinkDriver] Read-Syms GeneralConstants Read-Syms FileConstants read-syms FileConstants$($0) set SrcDir = $($1) ; ; Saisie du répertoire source si pas déjà fait pour OEMSETNT.INF ; ifstr(i) $($2) != "REMOVE" set InstallParam = "/F:"$(CardDriverINF) ifstr(i) $(!STF_SRCDIR_OVERRIDE) != "" set SrcDir = $(!STF_SRCDIR_OVERRIDE) else GetDiskPath = + Shell $(OtherInf), DoDiskette, $(!STF_LANGUAGE) "" $(SrcDir) ifint $($ShellCode) != $(!SHELL_CODE_OK) set ExitCode = STATUS_SHELL_ERROR goto EndInstallLink else-ifstr(i) $($R0) == STATUS_FAILED Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL" ifint $($ShellCode) != $(!SHELL_CODE_OK) set ExitCode = STATUS_SHELL_ERROR goto EndInstallLink endif set ExitCode = STATUS_FAILED goto EndInstallLink else-ifstr(i) $($R0) == STATUS_USERCANCEL set ExitCode = STATUS_USERCANCEL goto EndInstallLink endif set SrcDir = $($R1) set !STF_SRCDIR_OVERRIDE = $($R1) endif else set InstallParam = "/U /F:"$(CardDriverINF) endif ; Calcul nouveau Path shell "" FillPathEnd $(SrcDir) ifstr(i) $($2) == "INSTALL" set InstallPath = $($R0)$(SldInstallPath)\$(InstallProg) set InfPath = $($R0)$(SldInstallPath)\$(CardDriverINF) else set InstallPath = $($R0)$(InstallProg) set InfPath = $($R0)$(CardDriverINF) endif ; Analyse si fichier .INF présent sauf si mode Remove LibraryProcedure ExitCode, $(!LIBHANDLE), CheckFileExistance $(InfPath) ifstr(i) $(ExitCode) != YES ; Pas de suppression si SLD installé à part ifstr(i) $($2) == "REMOVE" set ExitCode = STATUS_SUCCESSFUL goto EndInstallLink endif Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING" + $(FileNotFound)$(!LF)$(CardDriverINF)$(!LF)$(!LF)$(GetAnotherPath) goto GetDiskPath endif ; Analyse si fichier Install présent LibraryProcedure ExitCode, $(!LIBHANDLE), CheckFileExistance $(InstallPath) ifstr(i) $(ExitCode) != YES Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING" + $(FileNotFound)$(!LF)$(InstallProg)$(!LF)$(!LF)$(GetAnotherPath) goto GetDiskPath endif RunProgram ExitCode "Interphase 553X Base Driver" "" $(InstallPath) $(InstallParam) ; Analyse code de sortie ifstr(i) $(ExitCode) == $(ERROR_SUCCESS) set ExitCode = STATUS_SUCCESSFUL else-ifstr(i) $(ExitCode) == $(ERROR_CANCELLED) set ExitCode = STATUS_USERCANCEL else set ExitCode = STATUS_FAILED endif EndInstallLink = + return $(ExitCode) $(SrcDir) ;------------------------------------------------------------------------ ; ; InstallOption: ; ; This section is shelled to by main installation processing ; or by NCPASHEL.INF during reconfig, removal, update, etc. ; ; ; FUNCTION: To copy files representing Options ; To configure the installed option ; To update the registry for the installed option ; ; INPUT: $($0): Language to use ; $($1): OptionID to install ; $($2): SourceDirectory ; $($3): AddCopy (YES | NO) ; $($4): DoCopy (YES | NO) ; $($5): DoConfig (YES | NO) ; ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL | ; STATUS_NOLANGUAGE | ; STATUS_USERCANCEL | ; STATUS_FAILED ; ;------------------------------------------------------------------------ [InstallOption] shell "" GetUserLanguage $($0) set Option = $($1) set SrcDir = $($2) set RasDir = $($2) set AddCopy = $($3) set DoCopy = $($4) set DoConfig = $($5) set hOemSwaDll = "" ; Handle Sur DLL set LibPath = $(!STF_WINDOWSSYSPATH) ; Chemin d'accès à la DLL set Status = STATUS_FAILED set DelFiles = $(TRUE) ; Test si langage demandé est supporté set LanguageList = ^(LanguagesSupported, 1) IfContains(i) $($0) NOT-IN $(LanguageList) Return STATUS_NOLANGUAGE endif Set-Subst LF = "\n" Set-Subst CR = "\r" Read-Syms GeneralConstants Read-Syms FileConstants$(Option) Read-Syms FileConstants Read-Syms DialogConstants$(!USER_LANGUAGE) ; Analyse si Phase d'installation de WinDows NT !NTN_Origination = "install" ; ou NetWork Control Panel !NTN_Origination = "ncpa" ifstr(i) $(!NTN_Origination) == "NCPA" set Continue = $(OK) endif Read-Syms FileConstants$(Option)$(!USER_LANGUAGE) Read-Syms FileConstants$(!USER_LANGUAGE) Detect Date Set-Title $(FunctionTitle) set to = Begin set from = Begin set CommonStatus = STATUS_SUCCESSFUL set !UG_Filename = $(SWAInfName) EndWait ;----------------------------------------------- ; ; ANALYSE DU MODE D'INSTALLATION ; et initialisation des variables qui en dépendent ; ;----------------------------------------------- Begin = + set DetectionCardDriver = $(FALSE) ; ; Désinstallation ; ifstr(i) $(!NTN_InstallMode) == deinstall set StartLabel = RemoveAdapter set DetectionCardDriver = $(TRUE) ; ; Mise à jour ; else-ifstr(i) $(!NTN_InstallMode) == update set StartLabel = UpgradeSoftware set DetectionCardDriver = $(TRUE) set LibPath = $(SrcDir) ; ; Bind ; else-ifstr(i) $(!NTN_InstallMode) == bind set StartLabel = BindingAdapter set DetectionCardDriver = $(TRUE) ; ; Configuration ; else-ifstr(i) $(!NTN_InstallMode) == configure set StartLabel = ConfigureAdapter set DetectionCardDriver = $(TRUE) set CommonStatus = STATUS_REBOOT ; ; Analyse si la configuration est acceptée pour ce produit ; ; NTN_RegBase = Clef du produit à configurer ; Si Adapter NTN_RegBase = Software\Microsoft\WindowsNT\NetCards\8 ; Si Driver NTN_RegBase = Software\Interphase\SYNxxx\CurrentVersion ; ifstr(i) $(ProductKeyName) == $(!NTN_RegBase) Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) set from = end set to = end goto NonFatalInfo endif ; ; Installation (par défaut) ; else set DetectionCardDriver = $(TRUE) set StartLabel = installadapter set OEM_ABANDON_OPTIONS = {} set OEM_ABANDON_SOFTWARE = FALSE set OEM_ABANDON_ON = TRUE ; Force Copie des fichiers pour résolution bug lors install réseau set DoCopy = YES endif ;----------------------------------------------- ; ; DETECTION du driver SYNSYS ; ; Si Driver de carte non installé installation ; ou configuration de SYNxxx impossible ; ; Installation automatique driver si ; [FileConstants] InstallSynSYS = 1 ; ;----------------------------------------------- DetectSynSYS = + ifstr(i) $(DetectionCardDriver) != $(TRUE) goto $(StartLabel) endif ; Détection de la présence de SynSYS OpenRegKey $(!REG_H_LOCAL) "" $(CardDriverKeyName) $(MAXIMUM_ALLOWED) KeyCardDriver ifstr $(KeyCardDriver) == $(KeyNull) ; ; Désinstallation possible sans Link Driver ; Chargement de DLL impossible car les Autres DLL sont absentes ; ifstr(i) $(!NTN_InstallMode) == deinstall set CardDriverPath = "" goto $(StartLabel) endif ; ; Installation intégrée du Link Driver ; ifstr $(InstallSynSYS) == $(TRUE) ; shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "WARNING" $(InstallCardDriver) ; ifstr $($R1) == OK shell "" InstallLinkDriver $(!USER_LANGUAGE) $(SrcDir) "INSTALL" ifstr $($RO) == STATUS_SHELL_ERROR goto ShellCodeError else-ifstr $($R0) == STATUS_SUCCESSFUL set SrcDir = $($R1) goto DetectSynSYS else-ifstr $($R0) == STATUS_USERCANCEL set CommonStatus = $($R0) goto successful else set CommonStatus = $($R0) set from = end set to = end goto fatal endif ; else ; set CommonStatus = STATUS_USERCANCEL ; goto successful ; endif else set Error = $(NoCardDriver); set from = end set to = end goto fatal endif else ; ; Lecture du répertoire d'installation de SynSYS ; Utilisé pour désinstallation ; GetRegValue $(KeyCardDriver),"PathName", CardDriverPathInfo ifint $(RegLastError) != $(!REG_ERROR_SUCCESS) set Error = $(CardDriverKo); set from = end set to = end goto fatal endif ; Extraction de la valeur à partir de la liste set CardDriverPath = *($(CardDriverPathInfo),4) CloseRegKey $(KeyCardDriver) ; ; Pas de chargement de DLL si désinstallation ; ifstr(i) $(!NTN_InstallMode) == deinstall ; goto $(StartLabel) ; endif endif ;----------------------------------------------- ; ; CHARGEMENT DLL et Vérification Version ; ; (Si Mode Update, on fonctionne déjà avec le nouveau .INF) ; si Erreur Message puis Sortie ; ;----------------------------------------------- LoadDll = + set LibPath = $(!STF_WINDOWSSYSPATH) shell "" FillPathEnd $(LibPath) set LibPath = $($R0)$(DllName) ; ; Traitement particulier en phase d'installation ; ifstr(i) $(StartLabel) == installadapter ; ; Recherche si la DLL existe déjà sur le disque et si Version Ok ; LibraryProcedure ExitCode, $(!LIBHANDLE), CheckFileExistance $(LibPath) ifstr(i) $(ExitCode) == YES ; ; Dll trouvée , analyse version ; LoadLibrary "x" $(LibPath) hOemSwaDll LibraryProcedure DllCurVersion $(hOemSwaDll) GetDllVersion ; Extraction version majeure Split-String $(DllCurVersion) "." DllMajCurVersion set DllMajCurVersion = *($(DllMajCurVersion),1) freeLibrary $(hOemSwaDll) ; ; Si mauvaise version, on charge la DLL directement sur la disquette ; ifstr(i) $(DllMajCurVersion) != $(DllMajVersion) set ExitCode = NO endif endif ; ; Dll absente du disque il s'agit d'une première installation ; ou mauvaise version ; Copie des fichiers ; ifstr(i) $(ExitCode) != YES ; ; Saisie du répertoire source si pas déjà fait pour OEMSETUP.INF ; ifstr(i) $(!STF_SRCDIR_OVERRIDE) != "" set SrcDir = $(!STF_SRCDIR_OVERRIDE) else Shell $(OtherInf), DoDiskette, $(!STF_LANGUAGE) "" $(SrcDir) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError else-ifstr(i) $($R0) == STATUS_FAILED Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL" ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) goto fatal else-ifstr(i) $($R0) == STATUS_USERCANCEL goto successful endif set SrcDir = $($R1) set !STF_SRCDIR_OVERRIDE = $($R1) endif install "PREInstall-Option" ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE" ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) goto fatal endif endif endif ; ; Traitement général du chargement de la DLL ; LoadLibrary #("Source Media Descriptions", 1, 1) $(LibPath) hOemSwaDll LibraryProcedure DllCurVersion $(hOemSwaDll) GetDllVersion ; Extraction version majeure Split-String $(DllCurVersion) "." DllMajCurVersion set DllMajCurVersion = *($(DllMajCurVersion),1) ; ; Si mauvaise version, Abandon ; ifstr(i) $(DllMajCurVersion) != $(DllMajVersion) set Error = $(DllVersionError); set from = end set to = end goto fatal endif goto $(StartLabel) ;----------------------------------------------------------------------------- ; ; INSTALLATION ; ; Détection de la présence de SYNxxx ; Si absent alors 1ère installation - > OldVersionExisted = FALSE ; Si présent ; si ajout logicel -> Impossible Message puis Fin ; si ajout adapter -> Test si il reste au moins une carte sans adapter ; si Oui -> OldVersionExisted = TRUE ; si Non -> Message puis Fin ; ;----------------------------------------------------------------------------- installadapter = + ; ; Détection si ajout d'adaptateur autorisé detect InitOemSwaDll ; ; Recherche présence clef logicel ; OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct ifstr $(KeyProduct) != $(KeyNull) ; ; Il Existe déjà ; CloseRegKey $(KeyProduct) ; ; Installation d'un logiciel (Normalement ce cas est impossible) ; On installe toujours un Adapter ; ifstr(i) !(NTN_RegBase) == $(ProductKeyName) ; ; Refus d'installation en double ; Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+ $(ProductVersion) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif goto end ; ; Ajout d'un Adapter ; Autorisé seulement si il reste au moins une ligne sur une carte non utilisée ; else-ifint $(AddAdapterOk) != $(TRUE) set Error = $(NoCard); set from = end set to = end goto Fatal else set OldVersionExisted = $(TRUE) endif ; ; Ajout d'un Adapter ; Autorisé seulement si il reste au moins une ligne sur une carte non utilisée ; else-ifint $(AddAdapterOk) != $(TRUE) set Error = $(NoCard); set from = end set to = end goto Fatal endif goto AdapterSetup ;----------------------------------------------- ; ; Configuration d'un Adaptateur ; ; Calcul du numéro d'adapter avant configuration ; ;----------------------------------------------- ConfigureAdapter = + ; ; Ouverture de la Clef ...\NetworkCards\(n) ; ifstr $(KeyProduct) == $(KeyNull) OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct ifstr $(KeyProduct) == $(KeyNull) set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE goto FatalRegistry endif endif ; ; recherche du service associé ; Shell $(UtilityInf) FindService, $(KeyProduct) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif ifstr(i) $($R0) != NO_ERROR goto FatalRegistry endif ; ; Au Retour de FindService ; ; $R1 -> Key Handle du service ...\SWA?Drv(n) ; $R2 -> Key Handle des paramètres du service ...\SWA?Drv(n)\Parameters ; CloseRegKey $($R1) ; Clef sur service non utilisée set KeyParameters = $($R2) ; ; Calcule numéro de l'adaptateur à partir de la clef ...\NetworkCards\(n) ; Split-String $(!NTN_RegBase) "\" BaseList QueryListSize ListSize $(BaseList) set AdapterNumber = *($(BaseList),$(ListSize)) ifstr $(KeyParameters) == $(KeyNull) set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE goto FatalRegistry endif CloseRegKey $(KeyParameters) set OldVersionExisted = $(TRUE) goto updateparameters ;----------------------------------------------- ; ; CREATION ADAPTER ; ; Installation et création du SoftWare si n'existe pas déjà ; Déclaration d'une carte réseau supplémentaire ; ;----------------------------------------------- AdapterSetup = + StartWait ; ; Ajout Logiciel si n'existe pas déjà ; ifint $(OldVersionExisted) == $(FALSE) ifstr(i) $(!NTN_InstallMode) == "install" ; ; Copie des fichiers si Logiciel absent et si mode Install ; ifstr(i) $(DoCopy) == "YES" ; ; Saisie du répertoire source si pas déjà fait pour OEMSETUP.INF ; ifstr(i) $(!STF_SRCDIR_OVERRIDE) != "" set SrcDir = $(!STF_SRCDIR_OVERRIDE) else Shell $(OtherInf), DoDiskette, $(!STF_LANGUAGE) "" $(SrcDir) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError else-ifstr(i) $($R0) == STATUS_FAILED Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL" ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) goto fatal else-ifstr(i) $($R0) == STATUS_USERCANCEL goto successful endif set SrcDir = $($R1) set !STF_SRCDIR_OVERRIDE = $($R1) endif endif ; ; Copie des fichiers ; Install "Install-Option" ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE" ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) goto Fatal endif ; ; Suppression du fichier OEMSETUP si générique ; ifstr(i) $(STF_CONTEXTINFNAME) != $(!STF_WINDOWSSYSPATH)\$(!UG_Filename) LibraryProcedure ExitCode, $(!LIBHANDLE), CheckFileExistance $(!STF_WINDOWSSYSPATH)\$(!UG_Filename) ifstr(i) $(ExitCode) == YES LibraryProcedure DelStatus $(!LIBHANDLE), DelFile $(STF_CONTEXTINFNAME) ifstr(i) $(DelStatus) == "SUCCESS" set STF_CONTEXTINFNAME = $(!STF_WINDOWSSYSPATH)\$(!UG_Filename) endif endif endif endif ; ; Déclaration du logiciel dans la clef SOFTWARE et du Service Associé ; (pas de dépendences ici car réservées au NCPA pour dépendences dynamiques) ; ; Shell $(UtilityInf), AddSoftwareComponent, + $(Manufacturer), + $(ProductSoftwareName), + $(ProductSoftwareName), + $(ProductSoftwareTitle),+ $(STF_CONTEXTINFNAME), + $(ProductSoftwareImagePath), + "kernel", + ; Lancement en mode manuel "NDIS", + {},+ "",+ $(NetEventDLL) set OEM_ABANDON_SOFTWARE = TRUE ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif ; ; Au retour de AddSoftwareComponent ; ; $R1 -> product version key handle ; $R2 -> NetRules subkey handle ; $R3 -> new Services key handle ; $R4 -> Parameters key ; $R5 -> Linkage Key ; set RegistryErrorIndex = $($R0) set KeyProduct = $($R1) set SoftNetRulesKey = $($R2) set LinkageKey = $($R5) CloseRegKey $($R3) CloseRegKey $($R4) ifstr(i) $(RegistryErrorIndex) != NO_ERROR EndWait CloseRegKey $(KeyProduct) CloseRegKey $(SoftNetRulesKey) CloseRegKey $(LinkageKey) goto FatalRegistry endif ; ; Ajout des dépendences statiques dans clef Linkage ; set NewValueList = {{OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),{$(SynOSDriverName)}}} Shell $(UtilityInf), AddValueList, $(LinkageKey), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif CloseRegKey $(LinkageKey) set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR EndWait CloseRegKey $(KeyProduct) CloseRegKey $(SoftNetRulesKey) goto fatalregistry endif ; ; Création des Valeurs de la clef Software CurrentVersion ; set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+ {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+ {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+ {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+ {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+ {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+ {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)},+ {PathName,$(NoTitle),$(!REG_VT_SZ),$(ProductPath)}} Shell $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR EndWait CloseRegKey $(KeyProduct) CloseRegKey $(SoftNetRulesKey) goto FatalRegistry endif ; ; Création des Valeurs de la clef CurrentVersion\NetRules ; set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+ {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, + {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, + {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, + {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(Bindable$(Option)Txt)}, + {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}} Shell $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) CloseRegKey $(KeyProduct) CloseRegKey $(SoftNetRulesKey) ifstr(i) $(RegistryErrorIndex) != NO_ERROR EndWait goto FatalRegistry endif ; ; Le SoftWare Existe ; endif ; ; Création de carte réseau ; ; SOFTWARE\Microsoft\WindowsNT\CurrentVersion\NetworkCards\(n) ; et du service associé constitué par le nom du SoftWare + Index de carte réseau ; ex : IPHISDN6 ; ; ; Suppression du fichier OEMSETUP si générique ; ifstr(i) $(STF_CONTEXTINFNAME) != $(!STF_WINDOWSSYSPATH)\$(!UG_Filename) LibraryProcedure ExitCode, $(!LIBHANDLE), CheckFileExistance $(!STF_WINDOWSSYSPATH)\$(!UG_Filename) ifstr(i) $(ExitCode) == YES LibraryProcedure DelStatus $(!LIBHANDLE), DelFile $(STF_CONTEXTINFNAME) ifstr(i) $(DelStatus) == "SUCCESS" Set STF_CONTEXTINFNAME = $(!STF_WINDOWSSYSPATH)\$(!UG_Filename) endif endif endif Shell $(UtilityInf), AddHardwareComponent,+ $(ProductHardwareName),+ $(STF_CONTEXTINFNAME),+ $(ProductKeyName) ifint $($R4) != -1 set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4)) endif ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR EndWait CloseRegKey $($R1) CloseRegKey $($R2) CloseRegKey $($R3) goto FatalRegistry endif ; ; Au Retour de AddHardwareComponent ; ; $R1 -> key Handle pour ...\NetworkCards\(n) ; $R2 -> key Handle pour ...\NetworkCards\(n)\NetRules ; $R3 -> key Handle pour <service>\Parameters ; $R4 -> Numéro d'adapter ; $R5 -> Nom du service = Nom Adapter + Numéro Adapter ; set KeyAdapter = $($R1) set KeyParameters = $($R3) set KeyAdapterRules = $($R2) set AdapterNumber = $($R4) CloseRegKey $(KeyParameters) ; ; Création des valeurs de la clef ...\NetworkCards\(n) ; set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+ {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+ {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+ {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+ {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+ {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+ {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}} Shell $(UtilityInf), AddValueList, $(KeyAdapter), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif CloseRegKey $(KeyAdapter) ; ; Création des valeurs de la clef ...\NetworkCards\(n)\NetRules ; set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)"""" set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm) set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+ {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, + {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, + {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}} Shell $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR EndWait CloseRegKey $(KeyParameters) CloseRegKey $(KeyAdapterRules) goto FatalRegistry endif CloseRegKey $(KeyAdapterRules) ;----------------------------------------------- ; ; MISE A JOUR OU CREATION DES PARAMETRES ; ; d'un adaptateur par procédure externe dans DLL ; correspondant à cet adaptateur ; ; ENTREE : $(AdapterNumber) Numéro d'adaptateur à paramétrer ; ;----------------------------------------------- updateparameters = + EndWait ; ; Configuration dans la DLL ; - Lecture paramètres ; - Affichage / Modification ; - Ecriture paramètres ; set FLibraryErrCtl = "1" set ConfigResult = "" LibraryProcedure ConfigResult $(hOemSwaDll) ConfigureAdpt + $(!USER_LANGUAGE) + $(AdapterNumber) + $(TapiMediaType) + $(!NTN_InstallMode) ifstr(i) $(ConfigResult) != "NO_ERROR" ifstr(i) $(ConfigResult) == "CANCEL" set CommonStatus = STATUS_USERCANCEL goto Successful else-ifstr(i) $(ConfigResult) == "NO_RAS" goto Successful else set Error = $(ConfigResult) set from = end set to = end goto Fatal endif endif ;----------------------------------------------- ; ; RAS CONFIGURATION OU INSTALLATION ; ; Détection si RAS est installé, si-non -> Installation ; Si RAS est installé alors configuration. ; ;----------------------------------------------- ; ; Détection installation de RAS avec fichier "oemnsvra.inf" ; Read-Syms InvokeRasDlg$(!USER_LANGUAGE) Shell "oemnsvra.inf" CheckRasInstalled ifint $($ShellCode) != $(!SHELL_CODE_OK) Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), + "STATUS", $(InvokeRasError) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif goto Successful endif set RasInstalled = $($R0) ; ; Si RAS non installé affiche message INSTALLATION RAS ; ifstr(i) $(RasInstalled) == FALSE Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", + $(InvokeRasSetupMsg) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto Successful endif ; ; Si RAS installé affiche message CONFIGURATION RAS ; else Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", + $(InvokeRasConfigMsg) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto Successful endif endif ; ; Positionne les flags d'installation RAS ; ifstr(i) $(!STF_IDW) == TRUE set AddCopy = NO set DoCopy = NO set DoConfig = NO else set AddCopy = YES set DoCopy = YES set DoConfig = YES endif ; ; Choix Mode INSTALL ou CONFIGURE de RAS ; set SaveNTN_InstallMode = $(!NTN_InstallMode) ifstr(i) $(RasInstalled) == TRUE set !NTN_InstallMode = configure else set !NTN_InstallMode = install endif ; ; Mise à jour des répertoires par défaut pour l'installation ; set SaveSTF_SRCDIR_OVERRIDE = $(!STF_SRCDIR_OVERRIDE) set !STF_SRCDIR_OVERRIDE = "" set RasDir = "A:\"$(!STF_PLATFORM) ; ; Appel du programme d'installation/configuration de RAS ; Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(RasDir) $(AddCopy) $(DoCopy) $(DoConfig) ; ; Restore les flags généraux. ; ; Mémorise Code de sortie de RAS et Répertoire d'install set RasResult = $($R0) set RasDir = $(!STF_SRCDIR_OVERRIDE) set !NTN_InstallMode = $(SaveNTN_InstallMode) set !STF_SRCDIR_OVERRIDE = $(SaveSTF_SRCDIR_OVERRIDE) ; ; Analyse des erreurs RAS. ; ifint $($ShellCode) != $(!SHELL_CODE_OK) Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", + $(InvokeRasError) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif goto Successful endif ; ; Install de RAS Annulée -> Annule install driver ; ifstr(i) $(RasInstalled) == FALSE ifstr(i) $(RasResult) == STATUS_USERCANCEL set CommonStatus = $(RasResult) goto fatal endif endif ; ; Si RAS annonce pas de changement et Mode Install ; alors message d'avertissement. ; ifstr(i) $(!NTN_InstallMode) == install ifstr(i) $(RasResult) == STATUS_NO_EFFECT Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", + $(InvokeRasAgainMsg) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto Successful endif endif ; ; Détection si un autre adaptateur réseau est installé, si non ; ajout de l'adaptateur LOOPBACK ; ifstr(i) $(RasResult) == STATUS_SUCCESSFUL set fNetcardInstalled = FALSE; Shell "" IsNetcardInstalled ifstr(i) $($R0) == STATUS_SUCCESSFUL set fNetcardInstalled = $($R1) endif ifstr(i) $(fNetcardInstalled) == FALSE Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "WARNING", $(NeedLoopback) ifstr(i) $($R1) == "OK" set AddCopy = YES set DoCopy = YES set DoConfig = YES set SaveNTN_InstallMode = $(!NTN_InstallMode) set SaveSTF_SRCDIR_OVERRIDE = $(!STF_SRCDIR_OVERRIDE) set !NTN_InstallMode = install set !STF_SRCDIR_OVERRIDE = $(RasDir) ifstr(i) $(RasDir) == "" set RasDir = "A:\"$(!STF_PLATFORM) endif Shell "oemnadlb.inf" InstallOption $(!STF_LANGUAGE) "LOOP" $(RasDir) $(AddCopy) $(DoCopy) $(DoConfig) set !NTN_InstallMode = $(SaveNTN_InstallMode) set !STF_SRCDIR_OVERRIDE = $(SaveSTF_SRCDIR_OVERRIDE) endif endif endif endif ; Restaure Code de sortie de RAS set CommonStatus = $(RasResult) goto Successful ;----------------------------------------------- ; ; Binding section ; ; Ce cas de figure n'existe pas, le fichier .INF d'un ; adapter n'est pas appelé pendant une opération de Bind. ; ;----------------------------------------------- BindingAdapter =+ set Error = "Binding: Sorry, not yet implemented." goto Fatal ;----------------------------------------------- ; ; SUPPRESSION d'un adapter ; ; et si plus d'adapter suppression du software ; ;----------------------------------------------- RemoveAdapter = + ifstr(i) $(ProductKeyName) == $(!NTN_RegBase) ; ; Suppression de la définition du logiciel ds les Registry. ; Normalement cette fonction est impossible car on refuse ; de supprimer le software tant qu'il existe au moins 1 Adapter. ; Le software est supprimé automatiquement par RemoveHardwareComponent ; sur le dernier adaptateur. ; Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), + $(ProductSoftwareName) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR goto FatalRegistry endif else ; ; Suppression des Ports RAS Si la DLL a pu être chargé ; (Si SYNSYS déjà désinstallé chargement DLL impossible) ifstr $(hOemSwaDll) != "" ; ; Calcule numéro de l'adaptateur à partir de la clef ...\NetworkCards\(n) Split-String $(!NTN_RegBase) "\" BaseList QueryListSize ListSize $(BaseList) set AdapterNumber = *($(BaseList),$(ListSize)) LibraryProcedure ConfigResult $(hOemSwaDll) RemoveAdpt $(AdapterNumber) $(TapiMediaType) freeLibrary $(hOemSwaDll) endif ; ; Suppression Hardware (Adapter) et si plus d'adapter suppression Software ; Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), + $(ProductSoftwareName), $(!NTN_RegBase) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR goto FatalRegistry endif ; ; Teste si le Software a été supprimé ; set KeyProduct = "" OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct ifstr $(KeyProduct) == $(KeyNull) ; ; Suppression fichiers ; install "Remove-Option" ; ; Suppression dans Event log clef software ; (Oubliée par RemoveSoftwareComponent !) ; set KeyEvent = "" OpenRegKey $(!REG_H_LOCAL) "" $(EventKeyName) $(MAXIMUM_ALLOWED) KeyEvent ifstr $(KeyEvent) != $(KeyNull) DeleteRegTree $(KeyEvent) $(ProductSoftwareName) CloseRegKey $(KeyEvent) endif ; ; Suppression de synsys si existe et si installé avec IPHWAN ; et si il n'existe plus d'adaptateur d'aucun type (DelFiles=TRUE) ; ifstr $(InstallSynSYS) == $(TRUE) ifstr $(DelFiles) == $(TRUE) ifstr $(CardDriverPath) != "" shell "" InstallLinkDriver $(!USER_LANGUAGE) $(CardDriverPath) "REMOVE" ifstr $($RO) == STATUS_SHELL_ERROR goto ShellCodeError endif endif endif endif else CloseRegKey $(KeyProduct) endif endif goto end ;----------------------------------------------- ; ; MISE A JOUR Software ; ; La mise à jour d'un adapateur est interdite ; (Message opérateur pour lui demander de faire un Update Software). ; ; ;----------------------------------------------- UpgradeSoftware = + ; ; Détermine si Update Software ou HardWare ; ifstr(i) $(ProductKeyName) == $(!NTN_RegBase) ; ; Mise à jour Software ; OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct ifstr $(KeyProduct) != $(KeyNull) GetRegValue $(KeyProduct),"MajorVersion", VersionInfo set Version = *($(VersionInfo), 4) ; ; Recherche du nom du fichier .INF pour remplacement ; Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set !UG_Filename = $($R0) ; ; Copie des fichiers uniquement si ils sont différents ; (Comparaison des dates) ; ifstr(i) $(!UG_Filename) != "" install "Install-Update" ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS goto Fatal endif endif ; ; Mise à jour numéro de version ; SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)} SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)} ; ; Rien n'est prévus en mode Update ! ; ifint $(Version) != $(ProductVersion) ; ; Mise à jour éventuelle sur changement de version ; endif CloseRegKey $(KeyProduct) shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(UpdateOk) else ; ; Erreur ouverture clef Software ? ; goto FatalRegistry endif else ; ; Pas de mise à jour d'un adaptateur ; shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(NoUpdateAdpt) endif goto end ;----------------------------------------------- ; ; Escape hatches ; ;----------------------------------------------- Successful = + goto end Abandon = + ForListDo $(OEM_ABANDON_OPTIONS) Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), + $(ProductSoftwareName), $($) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR goto FatalRegistry endif EndForListDo ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), + $(ProductSoftwareName), FALSE ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR goto FatalRegistry endif endif goto end WarningMsg = + Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif ifstr(i) $($R1) == "OK" goto $(to) else-ifstr(i) $($R1) == "CANCEL" goto $(from) endif goto end NonFatalInfo = + set Severity = STATUS set CommonStatus = STATUS_USERCANCEL ifstr(i) $(Error) == "" set Severity = NONFATAL Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL" ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) endif Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif ifstr(i) $($R1) == "OK" goto $(from) endif goto end FatalRegistry = + Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) goto Fatal FatalDetect = + Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) goto Fatal Fatal = + ifstr(i) $(Error) == "" Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL" ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) endif Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif goto SetFailed ShellCodeError = + set DlgType = "MessageBox" set STF_MB_TITLE = $(ShellCodeErrorTitle) set STF_MB_TEXT = $(ShellCodeErrorText) set STF_MB_TYPE = 1 set STF_MB_ICON = 3 set STF_MB_DEF = 1 UI Start "Error Message" goto SetFailed SetFailed = + set CommonStatus = STATUS_FAILED ifstr(i) $(OEM_ABANDON_ON) == TRUE set OEM_ABANDON_ON = FALSE goto Abandon endif goto end end = + Return $(CommonStatus) ;----------------------------------------------- ; ; PRE INSTALL ; ; Copie des fichiers necessaires à l'exécution ; de SETUP.INF ; ;----------------------------------------------- [PREInstall-Option] set STF_VITAL = "1" set STF_DECOMPRESS = "" set STF_OVERWRITE = "ALWAYS" ifstr(i) $(AddCopy) == "YES" ; ; Création de la liste des fichiers à copier ; ; DLL d'installation AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH) endif ifstr(i) $(DoCopy) == "YES" set !STF_NCPA_FLUSH_COPYLIST = TRUE CopyFilesInCopyList endif Exit ;----------------------------------------------- ; ; INSTALL ; ; Copie des fichiers en mode installation ; ;----------------------------------------------- [Install-Option] set STF_VITAL = "1" set STF_DECOMPRESS = "" set STF_OVERWRITE = "ALWAYS" ifstr(i) $(AddCopy) == "YES" ; ; Création de la liste des fichiers à copier ; DLL d'installation AddSectionKeyFileToCopyList Files-Inf OemDll $(SrcDir) $(!STF_WINDOWSSYSPATH) ; Help AddSectionFilesToCopyList Files-Help $(SrcDir) $(!STF_WINDOWSPATH)\Help ; ; Fichiers Driver AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(ProductPath) endif ifstr(i) $(DoCopy) == "YES" CreateDir $(ProductPath) set !STF_NCPA_FLUSH_COPYLIST = TRUE CopyFilesInCopyList endif exit ;----------------------------------------------- ; ; REMOVE ; ; Suppression des fichiers ; ;----------------------------------------------- [Remove-Option] set RemoveList = {} set DelOnRebootList = {} set DelFiles = $(TRUE) set OptionList = ^(Options, 1) set RemoveList = >($(RemoveList),#(Files-Remove,$(Option),1)) ; ; On ne supprime les autres fichiers que si il n'y a plus d'adaptateurs ; d'aucune des options ; OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_SoftwareBase)"\"$(Manufacturer) $(MAXIMUM_ALLOWED) KeyManufac ifstr $(KeyManufac) != $(KeyNull) ForListDo $(OptionList) OpenRegKey $(KeyManufac) "" $($) $(MAXIMUM_ALLOWED) KeyOption ifstr $(KeyOption) != $(KeyNull) set DelFiles = $(FALSE) CloseRegKey $(KeyOption) endif EndForListDo CloseRegKey $(KeyManufac) endif ifstr $(DelFiles) == $(TRUE) set RemoveList = >($(RemoveList),#(Files-Remove,OEMDLL ,1)) set RemoveList = >($(RemoveList),#(Files-Remove,HELP ,1)) set RemoveList = >($(RemoveList),#(Files-Remove,CNT ,1)) endif ; ; Suppression des fichiers standard ; set FLibraryErrCtl = 1 ForListDo $(RemoveList) ; Si le fichier existe LibraryProcedure ExitCode, $(!LIBHANDLE),CheckFileExistance $($) ifstr(i) $(ExitCode) == YES LibraryProcedure DelStatus $(!LIBHANDLE), DelFile $($) ifstr(i) $(DelStatus) != "SUCCESS" set DelOnRebootList = >($(DelOnRebootList),$($)) else ; ; Si le fichier existe toujours, il était en cours d'utilisation ; LibraryProcedure ExitCode, $(!LIBHANDLE),CheckFileExistance $($) ifstr(i) $(ExitCode) == YES set DelOnRebootList = >($(DelOnRebootList),$($)) endif endif endif EndForListDo ; ; Suppression des fichiers en cours d'utilisation ; par ajout dans la liste de suppression du fichier renommé en .old ; ForListDo $(DelOnRebootList) Split-String $($) "." FilePath QueryListSize PathLen $(FilePath) set FileToDelete = "" ForListDo $(FilePath) ifint $(#) < $(PathLen) set FileToDelete = $(FileToDelete)$($) else set FileToDelete = $(FileToDelete)"old" endif EndForListDo ; Si le fichier renomé existe déjà supprime avant rename LibraryProcedure ExitCode, $(!LIBHANDLE),CheckFileExistance $(FileToDelete) ifstr(i) $(ExitCode) == YES LibraryProcedure DelStatus $(!LIBHANDLE), DelFile $(FileToDelete) endif LibraryProcedure ExitCode, $(!LIBHANDLE),RenFile $($),$(FileToDelete) AddFileToDeleteList $(FileToDelete) EndForListDo set FLibraryErrCtl = 0 exit ;----------------------------------------------- ; ; UPDATE ; ; Copie des fichiers en mode mise à jour ; ;----------------------------------------------- [Install-Update] set STF_VITAL = "" set STF_OVERWRITE = "VERIFYSOURCEOLDER" ;set STF_VERSION = "YES" AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(ProductPath) AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH) AddSectionFilesToCopyList Files-Help $(SrcDir) $(!STF_WINDOWSPATH)\Help set !STF_NCPA_FLUSH_COPYLIST = TRUE CopyFilesInCopyList exit ;*********************************************************************** ; ;*********************************************************************** [Source Media Descriptions] 1 = "Interphase 553X Ras Support" , TAGFILE = IPHWAN.SY_ ;*********************************************************************** ; ;*********************************************************************** [ProductType] STF_PRODUCT = Winnt STF_PLATFORM = I386 [Files-Inf] Setnt = 1, oemsetnt.inf, SIZE=45000 ,RENAME=$(!UG_Filename) OemDll = 1, cndiswan.dl_, SIZE=150000,DECOMPRESS,RENAME=cndiswan.dll [Files-Help] Help = 1, cndiswan.HL_, SIZE=15000 ,DECOMPRESS,RENAME=cndiswan.HLP Cnt = 1, cndiswan.CN_, SIZE=1000 ,DECOMPRESS,RENAME=cndiswan.CNT [Files-IPHISDN] 1, IPHWAN.SY_, SIZE=60000, DECOMPRESS,RENAME=IPHISDN.sys [Files-IPHDM] 1, IPHWAN.SY_, SIZE=60000, DECOMPRESS,RENAME=IPHDM.sys [Files-Remove] IPHISDN = $(DriverPath)\IPHISDN.sys IPHDM = $(DriverPath)\IPHDM.sys OEMDLL = $(!STF_WINDOWSSYSPATH)\cndiswan.dll HELP = $(!STF_WINDOWSPATH)\Help\cndiswan.Hlp CNT = $(!STF_WINDOWSPATH)\Help\cndiswan.Cnt ;*********************************************************************** ; ;*********************************************************************** [LanguagesSupported] ENG FRA ;*********************************************************************** ; ;*********************************************************************** [OptionsTextENG] IPHISDN = "Interphase 553X ISDN RAS Support" IPHDM = "Interphase 5536 Digital Modem RAS Support" [OptionsTextFRA] IPHISDN = "Interphase 553X RNIS Support RAS" IPHDM = "Interphase 5536 Digital Modem Support RAS" ;----------------------------------------------- ; ; Messages qui dépendent de la langue utilisée ; ; Version Anglaise ;----------------------------------------------- [FileConstantsENG] ProCaption = "Windows NT Setup" ProCancel = "Cancel" ProCancelMsg = "Windows NT Networking is not correctly installed. "+ "Are you sure you want to cancel copying files?" ProCancelCap = "Network Setup Message" ProText1 = "Copying:" ProText2 = "To:" FileNotFound = "The setup software cannot found:" GetAnotherPath = "Please type another path." FunctionTitle = "Interphase "$(TapiMediaName)" RAS Setup" ProductHardwareDescription = "Interphase "$(TapiMediaName)" 553X WAN adapters"$(CR)$(LF)+ "Remote Access Service (RAS) support." ProductHardwareTitle = "Interphase "$(TapiMediaName)" RAS support" ProductSoftwareDescription = "Interphase "$(TapiMediaName)" RAS Driver" ProductSoftwareTitle = "Interphase "$(TapiMediaName)" RAS support" ShellCodeErrorTitle = "Error: "$(FunctionTitle) ShellCodeErrorText = "Shell Code Error." InstallCardDriver = "Interphase 553X RAS Support"$(LF)+ "needs previous installation of"$(LF)+ "Interphase 553X Base Driver."$(LF)$(LF)+ "Please confirm this driver installation?" NoCardDriver = "Interphase 553X Base Driver "$(LF)+ "software not found."$(LF)+ "Please install this product before." CardDriverKo = "Interphase 553X Base Driver"$(LF)+ "Unable to find configuration of this product." NoCard = "No Interphase "$(TapiMediaName)" card installed or configured,"$(LF)+ "cannot create a network adapter."$(LF)$(LF)+ "Please, add a card with the control panel WAN Setup icon"$(LF)+ "and try again." NoAdapter = "No Interphase card driver installed or,"$(LF)+ "all adapters supported by the RAS Support driver are already created."$(LF)+ "Cannot create another adapter." NoUpdateAdpt = "Unable to update adapter."$(LF)+ "Please update network Software instead." UpdateOk = "Interphase RAS Support"$(LF)+ "Update is complete." DllVersionError = "Incorrect version of : "$(DllName) DllRunningError = "Unable to add,remove or configure RAS Support adapter,"+ "configuration software already running." ;----------------------------------------------- ; ; Messages qui dépendent de la langue utilisée ; ; Version Française ;----------------------------------------------- [FileConstantsFRA] ProCaption = "Windows NT Configuration" ProCancel = "Annuler" ProCancelMsg = "L'adaptateur réseau Windows NT n'est pas installé correctement."+ "Etes vous sur de vouloir annuler la copie des fichiers?" ProCancelCap = "Message Configuration Réseau" ProText1 = "Copie:" ProText2 = "Vers:" FileNotFound = "Le programme d'installation ne peut trouver :" GetAnotherPath = "Veuillez saisir un nouveau chemin." FunctionTitle = "Configuration du support RAS Interphase "$(TapiMediaName) ProductHardwareDescription = "Support du service d'accès distant (RAS) pour"$(CR)$(LF)+ "adaptateurs 553X Interphase "$(TapiMediaName)"." ProductHardwareTitle = "Support RAS Interphase "$(TapiMediaName) ProductSoftwareDescription = "Driver RAS Interphase "$(TapiMediaName) ProductSoftwareTitle = "Support RAS Interphase "$(TapiMediaName) ShellCodeErrorTitle = "Erreur: "$(FunctionTitle) ShellCodeErrorText = "Code Erreur Shell." InstallCardDriver = "Le Support RAS Interphase 553X"$(LF)+ "nécessite l'installation préalable du"$(LF)+ "Driver de Base 553X Interphase"$(LF)$(LF)+ "Confirmez vous l'installation de ce driver ?" NoCardDriver = "Driver de Base 553X Interphase"$(LF)+ "Logiciel non installé."$(LF)+ "Veuillez installer ce logiciel au préalable." CardDriverKo = "Driver de Base 553X Interphase"$(LF)+ "La configuration de ce produit est introuvable!" NoCard = "Aucune carte "$(TapiMediaName)" Interphase n'est installée ou configurée."$(LF)+ "La création d'un adaptateur réseau est impossible."$(LF)$(LF)+ "Veuillez ajouter une carte avec l'icone WAN Configuration"$(LF)+ "du panneau de configuration puis essayez à nouveau." NoAdapter = "Aucune carte Interphase n'est installé,"$(LF)+ "ou le nombre maximum d'adaptateurs du driver de support RAS est atteint."$(LF)+ "L'ajout d'un nouvel adaptateur est impossible." NoUpdateAdpt = "Mise à jour d'un adaptateur impossible."$(LF)+ "Seul le logiciel réseau peut être mis à jour." UpdateOk = "Support RAS Interphase"$(LF)+ "Mise à jour terminée avec succés." DllVersionError = "Mauvaise version de : "$(DllName) DllRunningError = "Installation,configuration ou suppression adaptateur de support"+ " RAS non autorisée,programme de configuration déjà actif." ;----------------------------------------------------- ; ; Messages qui dépendent de la langue et de l'option ; ;----------------------------------------------------- [FileConstantsIPHISDNENG] TapiMediaName = "553X ISDN" [FileConstantsIPHISDNFRA] TapiMediaName = "553X RNIS" [FileConstantsIPHDMENG] TapiMediaName = "5536 Digital Modem" [FileConstantsIPHDMFRA] TapiMediaName = "5536 Digital Modem" [DialogConstantsENG] Help = "&Help" Exit = "Cancel" OK = "OK" HelpContext = "" Continue = "Continue" Cancel = "Cancel" [DialogConstantsFRA] Help = "&Aide" Exit = "Quitter" OK = "OK" HelpContext = "" Continue = "Continuer" Cancel = "Annuler" ;----------------------------------------------------- ; ; Messages d'installation et de configuration RAS ; ;----------------------------------------------------- [InvokeRasDlgENG] InvokeRasSetupMsg = "Interphase RAS Support setup is complete. "+ "Remote Access Services (RAS) must now be installed. "+ "Please update the "$(TapiMediaType)"(n) port list in RAS "+ "setup to enable you to use RAS over "$(TapiMediaName)"." InvokeRasConfigMsg = "Interphase RAS Support setup is complete. "+ "Remote Access Services (RAS) setup must now be invoked. "+ "Please update the "$(TapiMediaType)"(n) port list in RAS "+ "setup to enable you to use RAS over "$(TapiMediaName)"." InvokeRasError = "Interphase RAS Support setup encountered an error "+ "while invoking the RAS setup INF file (OEMNSVRA.INF). "+ "Please make sure that the file is present in this "+ "directory: "$(!STF_WINDOWSSYSPATH)"." InvokeRasAgainMsg = "Interphase RAS Support setup is complete! "+ "Remote Access Services (RAS) is not configured to use a "+ $(TapiMediaType)"(n) port. You must configure at least one "+ "port in RAS setup now, or you will have reconfigure the adapter "+ "before running RAS configuration again later." NeedLoopback = "RAS Setup has discovered your computer does not have a network adapter installed. "+ "If you have configured one or more ports to receive calls, you must install the "+ "MS Loopback Adapter to enable remote clients to use resources on this computer."+ $(LF)$(LF)"Click OK to install the MS Loopback Adapter." [InvokeRasDlgFRA] InvokeRasSetupMsg = "La configuration du support RAS Interphase est terminée. "+ "Le service d'accès distant (RAS) doit être installé. "+ "Puis, veuillez mettre à jour la liste des ports "$(TapiMediaType)"(n) "+ "dans la configuration RAS pour utiliser l'accès "$(TapiMediaName)"." InvokeRasConfigMsg = "La configuration du support RAS Interphase est terminée. "+ "Veuillez mettre à jour la liste des ports "$(TapiMediaType)"(n) dans la "+ "configuration du Service d'Accès Distant (RAS) pour utiliser le "+ "réseau "$(TapiMediaName)"." InvokeRasError = "La configuration du support RAS Interphase a rencontré "+ "une erreur dans le fichier du logiciel d'accès distant (OEMNSVRA.INF). "+ "Vérifiez la présence et le contenu de ce fichier dans le répertoire "+ $(!STF_WINDOWSSYSPATH)"." InvokeRasAgainMsg = "La configuration du support RAS Interphase est terminée! "+ "Le service d'accès distant (RAS) n'est pas configuré pour "+ "utiliser un port "$(TapiMediaType)"(n).Avant de rajouter un port "+ "dans la configuration RAS, vous devrez obligatoirement reconfigurer "+ "l'adaptateur Interphase Support RAS "$(TapiMediaName)"." NeedLoopback = "Le programme d'installation de RAS a découvert que votre ordinateur n'a pas de "+ "carte réseau local installée. Si vous avez configuré un ou plusieurs ports pour recevoir "+ "des appels,vous devez installer la carte de bouclage MS pour permettre aux clients "+ "distants d'utiliser les ressources sur cet ordinateur."+ $(LF)$(LF)"Cliquez sur OK pour installer la carte de bouclage MS."Download Driver Pack
After your driver has been downloaded, follow these simple steps to install it.
Expand the archive file (if the download file is in zip or rar format).
If the expanded file has an .exe extension, double click it and follow the installation instructions.
Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.
Find the device and model you want to update in the device list.
Double-click on it to open the Properties dialog box.
From the Properties dialog box, select the Driver tab.
Click the Update Driver button, then follow the instructions.
Very important: You must reboot your system to ensure that any driver updates have taken effect.
For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.