TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
atfzz3
NA
1
0
[C#] Need help for Using WMI to set Proxy Settings
May 6 2004 11:29 AM
Hello ! I'm a beginner in C# developpement and I want to set up Internet Explorer Proxy settings with WMI. And, using Win32_Proxy and SetProxySetting method, it work !!! My code look like that : string requeteProxy = "SELECT * FROM Win32_Proxy" ; ManagementObjectSearcher MOSearchProxy = new ManagementObjectSearcher(requeteProxy); ManagementObjectCollection MOCollectionProxy = MOSearchProxy.Get(); foreach( ManagementObject MOProxy in MOCollectionProxy ) { try { ManagementBaseObject objNewProxy = null; ManagementBaseObject objSetProxy = null; objNewProxy = MOProxy.GetMethodParameters("SetProxySetting"); objNewProxy["ProxyServer"] = textBoxProxyIP.Text; objNewProxy["ProxyPortNumber"] = textBoxProxyPort.Text; objSetProxy = MOProxy.InvokeMethod("SetProxySetting", objNewProxy, null); } catch ( Exception ex ) { MessageBox.Show( "Erreur lors du paramétrage du Proxy : " + ex.Message ) ; } } Everything is ok, but when I want to load a Network profil without Proxy Setting, I don't know how disable Internet Explorer Proxy Use. If someone cant help me .... thanks to him =)
Reply
Answers (
0
)
Save ArrayList to Tree Nodes
Need Help: Undo/Redo - Windows Forms, Data Binding and Business Objects