Précédent   Forum des professionnels en informatique > Systèmes > Windows > Windows XP
Windows XP Forum d'entraide Windows XP. Avant de poster : La F.A.Q Windows XP
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 27/05/2011, 09h38   #1
Invité de passage
 
Homme Franck
Technicien réseau
Inscription : mai 2011
Messages : 2
Détails du profil
Informations personnelles :
Nom : Homme Franck
Localisation : France

Informations professionnelles :
Activité : Technicien réseau

Informations forums :
Inscription : mai 2011
Messages : 2
Points : 0
Points : 0
Par défaut Config proxy Firefox ou IE par script

Bonjour,

J'ai un serveur LINUX/Ubuntu avec Samba qui me sert de Controleur de domaine.
J'ai des postes XP qui se connecte dessus sans Problème.

La question est la suivante,

Mes postes XP Pro Sp2 ont IE, peut-on configurer automatiquement le Proxy, avec un script ou autre pour éviter que les utilisateurs ont à faire la manip.

Merci pour votre aide.

Franck
fgouret est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 28/11/2011, 03h04   #2
Membre Expert
 
Avatar de hackoofr
 
Homme Mehdi Tounisiano
Enseignant
Inscription : juin 2009
Messages : 745
Détails du profil
Informations personnelles :
Nom : Homme Mehdi Tounisiano
Âge : 37
Localisation : Tunisie

Informations professionnelles :
Activité : Enseignant

Informations forums :
Inscription : juin 2009
Messages : 745
Points : 1 221
Points : 1 221
Citation:
Envoyé par fgouret Voir le message
Bonjour,
J'ai un serveur LINUX/Ubuntu avec Samba qui me sert de Controleur de domaine.
J'ai des postes XP qui se connecte dessus sans Problème.
La question est la suivante,
Mes postes XP Pro Sp2 ont IE, peut-on configurer automatiquement le Proxy, avec un script ou autre pour éviter que les utilisateurs ont à faire la manip.
Merci pour votre aide.
Franck

ce vbscript sert à changer la configuration du proxy pour Internet Explorer:
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
' Initialize Objects
     Dim LocalClass_StdRegProv: Set LocalClass_StdRegProv = GetObject("winmgmts:{impersonationlevel=impersonate}!//./root/default:StdRegProv")
     Dim EmptyRecordset: Set EmptyRecordset = CreateObject("ADODB.Recordset")
 ' Define Constants
     Const HKEY_CLASSES_ROOT = &H80000000, HKCR = &H80000000
     Const HKEY_CURRENT_USER = &H80000001, HKCU = &H80000001
     Const HKEY_LOCAL_MACHINE = &H80000002, HKLM = &H80000002
     Const HKEY_USERS = &H80000003, HKU = &H80000003
     Const HKEY_PERFORMANCE_DATA = &H80000004, HKPD = &H80000004
     Const HKEY_CURRENT_CONFIG = &H80000005, HKCC = &H80000005
     Const HKEY_DYN_DATA = &H80000006, HKDD = &H80000006
     Const MaxCharacters = 255
     Const adVarChar = 200
     Const adInteger = 3
 ' Dimension Public Variables
     Dim EntryNumber: EntryNumber = 0
     Dim Return
 
 EmptyRecordset.Fields.Append "Entry", adInteger
 EmptyRecordset.Fields.Append "Name", adVarChar, MaxCharacters
 EmptyRecordset.Fields.Append "Server", adVarChar, MaxCharacters
 EmptyRecordset.Fields.Append "Port", adInteger
 EmptyRecordset.Open
 
 ' Add server/port
     EntryNumber = EntryNumber + 1
     EmptyRecordset.AddNew
     EmptyRecordset("Entry") = EntryNumber
     EmptyRecordset("Name") = "Proxy 172.16.0.1:3128"
     EmptyRecordset("Server") = "172.16.0.1"
     EmptyRecordset("Port") = 3128
     EmptyRecordset.Update
 
     EntryNumber = EntryNumber + 1
     EmptyRecordset.AddNew
     EmptyRecordset("Entry") = EntryNumber
     EmptyRecordset("Name") = "Sans Proxy"
     EmptyRecordset("Server") = ""
     EmptyRecordset("Port") = 80
     EmptyRecordset.Update
 
 
 Dim Message
 EmptyRecordset.MoveFirst
 Do While EmptyRecordset.EOF = False
     Message = Message & EmptyRecordset("Entry").Value & "." & vbTab & EmptyRecordset("Name").Value & vbCrLf
     EmptyRecordset.MoveNext
 Loop
 
 Do
     Dim intAnswer: intAnswer = InputBox(Message, "Choisir une puis validez sur Ok", "1")
     If IsNumeric(intAnswer) = True Then intAnswer = CLng(intAnswer)
     If intAnswer > EmptyRecordset.RecordCount Or intAnswer < 0 Then WScript.Echo "Invalid entry, please try again..."
 Loop Until (((VarType(intAnswer) And vbLong) = vbLong) And intAnswer <= EmptyRecordset.RecordCount And intAnswer >= 0)
 
 Select Case True
     Case (intAnswer = 0)
         WScript.Echo "Cancelled. Exiting."
     Case (((VarType(intAnswer) And vbLong) = vbLong) And intAnswer <= EmptyRecordset.RecordCount And intAnswer > 0)
         EmptyRecordset.Filter = "Entry=" & intAnswer
         Dim ProxyServer: ProxyServer = EmptyRecordset("Server").Value & ":" & EmptyRecordset("Port").Value
         intAnswer = MsgBox("Would you like to set the proxy to " & EmptyRecordset("Name").Value & " (" & ProxyServer & ")?", vbQuestion + vbYesNo + vbSystemModal, "Confirm")
         If intAnswer = vbYes Then
             Return = LocalClass_StdRegProv.SetDWORDValue(HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", 1)
             Return = LocalClass_StdRegProv.SetStringValue(HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", ProxyServer)
             ChangeIP()
             If Err.Number = 0 And Return = 0 Then
                 WScript.Echo "Proxy settings changed. Exiting."
             Else
                 WScript.Echo "Proxy settings not changed. Exiting."
             End If
         Else
             WScript.Echo "No changes made. Exiting."
         End If
     Case Else
         WScript.Echo "Invalid entry. Exiting"
 End Select
__________________
[VBS] SHORTCUTREMOVER outil pour supprimer automatiquement les raccourcis infectés par un virus sur une clé USB
[VBS] Protection Dossier par Mot de Passe
Mes Contributions en Téléchargement
N'oubliez pas de voter pour les messages dont la réponse est pertinente, ayez le réflexe du +1 pour le contributeur ( C'est gratuit et ça donne l'impression d'être utile)
et si votre Problème est résolu pensez au Tag


hackoofr est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 19h57.


 
 
 
 
Partenaires

Hébergement Web