ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Série de fonctions pour l'internet explorer   



L'auteur

Mike Gagnon
Canada Canada
Membre Simple
# 0000000025
enregistré le 14/10/2004

Gagnon Mike
Pointe Cla H9R 3K8
de la société Carver Technologies Inc.
Fiche personnelle


Note des membres
pas de note

Contributions > 09 - Automation > WMI (Windows Management Instrumentation)

Série de fonctions pour l'internet explorer
# 0000000063
ajouté le 17/11/2004 21:04:10 et modifié le 17/11/2004
consulté 9105 fois
Niveau expert

Version(s) Foxpro :
VFP 7.0

Description

Voici une série de fonction sur l'internet explorer avec WMI.

Code source :
&& Renvoye le type de rafrachissement et le dossier ou se trouve les fichiers temporaires pour l'internet explorer. En ce moment à temps, la classe de MicrosoftIE_Cache utilisée en ce manuscrit n'a pas été publiquement documentée.

CLEAR
lcComputer = "."
loWMIService = GetObject("winmgmts:\\" + lcComputer ;
"\root\cimv2\Applications\MicrosoftIE")
colIESettings = loWMIService.ExecQuery ;
("Select * from MicrosoftIE_Cache")
SET step on
For Each lcIESetting in colIESettings
?"Page refresh type: " + lcIESetting.PageRefreshType
?"Temporary Internet files folder: " + ;
lcIESetting.TempInternetFilesFolder
Next

&&Renvoie des informations sur des arrangements de raccordement d'Internet Explorer. En ce moment à temps, la classe de MicrosoftIE_ConnectionSettings utilisée en ce manuscrit n'a pas été publiquement documentée.

CLEAR
lcComputer = "."
loWMIService = GetObject("winmgmts:\\" + lcComputer ;
"\root\cimv2\Applications\MicrosoftIE")
colIESettings = loWMIService.ExecQuery ;
("Select * from MicrosoftIE_ConnectionSettings")
For Each lcIESetting in colIESettings
?"Allow Internet programs: " + ;
lcIESetting.AllowInternetPrograms
?"Autoconfiguration URL: " + lcIESetting.AutoConfigURL
?"Auto disconnect: " + lcIESetting.AutoDisconnect
?"Autoconfiguration proxy detection mode: " + ;
lcIESetting.AutoProxyDetectMode
?"Data encryption: " + lcIESetting.DataEncryption
?"Default: " + transf(lcIESetting.Default)
?"Default gateway: " + lcIESetting.DefaultGateway
?"Dialup server: " + lcIESetting.DialUpServer
?"Disconnect idle time: " + TRANSFORM(lcIESetting.DisconnectIdleTime)
?"Encrypted password: " + lcIESetting.EncryptedPassword
?"IP address: " + lcIESetting.IPAddress
?"IP header compression: " + ;
lcIESetting.IPHeaderCompression
?"Modem: " + lcIESetting.Modem
?"Name: " + lcIESetting.Name
?"Network logon: " + lcIESetting.NetworkLogon
?"Network protocols: " + lcIESetting.NetworkProtocols
?"Primary DNS server: " + lcIESetting.PrimaryDNS
?"Primary WINS server: " + lcIESetting.PrimaryWINS
?"Proxy: " + lcIESetting.Proxy
?"Proxy override: " + lcIESetting.ProxyOverride
?"Proxy server: " + lcIESetting.ProxyServer
?"Redial attempts: " + TRANSFORM(lcIESetting.RedialAttempts)
?"Redial wait: " + TRANSFORM(lcIESetting.RedialWait)
?"Script fileame: " + lcIESetting.ScriptFileName
?"Secondary DNS server: " + lcIESetting.SecondaryDNS
?"Secondary WINS server: " + lcIESetting.SecondaryWINS
?"Server assigned IP address: " + ;
lcIESetting.ServerAssignedIPAddress
?"Server assigned name server: " + ;
lcIESetting.ServerAssignedNameServer
?"Software compression: " + lcIESetting.SoftwareCompression
Next

&& Recherche du sommaire de raccordement d'Internet Explorer. En ce moment à temps, la classe de MicrosoftIE_ConnectionSummary utilisée en ce manuscrit n'a pas été publiquement documentée.

CLEAR
lcComputer = "."
loWMIService = GetObject("winmgmts:\\" + lcComputer ;
"\root\cimv2\Applications\MicrosoftIE")
colIESettings = loWMIService.ExecQuery ;
("Select * from MicrosoftIE_ConnectionSummary")
For Each lcIESetting in colIESettings
?"Connection preference: " + ;
lcIESetting.ConnectionPreference
?"HTTP 1.1. enabled: " + TRANSFORM(lcIESetting.EnableHTTP11)
?"Proxy HTTP 1.1. enabled: " + TRANSFORM(lcIESetting.ProxyHTTP11)
Next

&& Renvoie l'information de version sur les fichiers de base pour l'Internet Explorer. En ce moment à temps, la classe de MicrosoftIE_FileVersion utilisée dans ce script n'a pas été publiquement documentée.

lcComputer = "."
loWMIService = Getobject("winmgmts:\\" + lcComputer ;
  + "\root\cimv2\Applications\MicrosoftIE")
colIESettings = loWMIService.ExecQuery ;
  ("Select * from MicrosoftIE_FileVersion")
For Each lcIESetting In colIESettings
  ?"Company: " + lcIESetting.Company
  ?"Date: " +  WMIDateStringToDate(lcIESetting.Date)
  ?"File name: " + lcIESetting.File
  ?"Path: " + lcIESetting.Path
  ?"File size: " + Transform(lcIESetting.Size)
  ?"Version: " + Transform(lcIESetting.Version)
Next

Function WMIDateStringToDate(lctime)
WMIDateStringToDate = Substr(lctime, 5, 2)+"/"+Substr(lctime,7,2)+"/"+;
  SUBSTR(lctime,1,4)+" "+Substr(lctime,9,2)+":"+Substr(lctime,11,2)+":"+Substr(lctime,13,2)
Return WMIDateStringToDate
Endfunc

&& Renvoie l'information de réseau (information y compris de proxy server) pour l'Internet Explorer. En ce moment à temps, la classe de MicrosoftIE_LANSettings utilisée en ce manuscrit n'a pas été publiquement documentée.

Clear
lcComputer = "."
loWMIService = Getobject("winmgmts:\\" + lcComputer ;
  + "\root\cimv2\Applications\MicrosoftIE")
colIESettings = loWMIService.ExecQuery ;
  ("Select * from MicrosoftIE_LANSettings")
For Each lcIESetting In colIESettings
  ?"Autoconfiguration proxy: " + lcIESetting.AutoConfigProxy
  ?"Autoconfiguration URL: " + lcIESetting.AutoConfigURL
  ?"Autoconfiguration Proxy detection mode: " + ;
    lcIESetting.AutoProxyDetectMode
  ?"Proxy: " + lcIESetting.Proxy
  ?"Proxy override: " + lcIESetting.ProxyOverride
  ?"Proxy server: " + lcIESetting.ProxyServer
Next

&& Renvoie l'information de base de classe de COM pour l'Internet Explorer. En ce moment à temps, la classe de MicrosoftIE_Object utilisée en ce manuscrit n'a pas été publiquement documentée.

lcComputer = "."
loWMIService = Getobject("winmgmts:\\" + lcComputer ;
  + "\root\cimv2\Applications\MicrosoftIE")
colIESettings = loWMIService.ExecQuery ;
  ("Select * from MicrosoftIE_Object")
For Each lcIESetting In colIESettings
  ?"Code base: " + lcIESetting.CodeBase
  ?"Program file: " + lcIESetting.ProgramFile
  ?"Status: " + lcIESetting.Status
Next

&& Recherche le réglage courant de niveau pour chaque zone de sécurité d'Internet Explorer. En ce moment à temps, la classe de MicrosoftIE_Security utilisée en ce manuscrit n'a pas été publiquement documentée. Des conditions sur Windows 2000 et Windows NT 4,0, vous devez avoir la version 5,5 ou plus tard d'Internet Explorer installé.

Clear
lcComputer = "."
loWMIService = Getobject("winmgmts:\\" + lcComputer ;
  + "\root\cimv2\Applications\MicrosoftIE")
colIESettings = loWMIService.ExecQuery ;
  ("Select * from MicrosoftIE_Security")
For Each lcIESetting In colIESettings
  ?"Zone name: " + lcIESetting.Zone
  ?"Security level: " + lcIESetting.Level
Next

&&L'information de base de retours (numéro de version y compris et numéro de construction) pour l'Internet Explorer. En ce moment à temps, la classe de MicrosoftIE_Summary utilisée en ce manuscrit n'a pas été publiquement documentée.

Clear
lcComputer = "."
loWMIService = Getobject("winmgmts:\\" + lcComputer ;
  + "\root\cimv2\Applications\MicrosoftIE")
colIESettings = loWMIService.ExecQuery ;
  ("Select * from MicrosoftIE_Summary")
For Each lcIESetting In colIESettings
  ?"Active printer: " + lcIESetting.ActivePrinter
  ?"Build: " + lcIESetting.Build
  ?"Cipher lcength: " + Transform(lcIESetting.CipherStrength)
  ?"Content advisor: " + lcIESetting.ContentAdvisor
  ?"IE Administration Kit installed: " + ;
    lcIESetting.IEAKInstall
  ?"Language: " + lcIESetting.Language
  ?"Name: " + lcIESetting.Name
  ?"Path: " + lcIESetting.Path
  ?"Product ID: " + lcIESetting.ProductID
  ?"Version: " + lcIESetting.Version
Next

Commentaires
Aucun commentaire enregistré ...

Publicité

Les pubs en cours :


www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2024.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3