473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

IE7, Registry & Proxy

MC
Hi all,
I have write a simple program in c# that change proxy setting for IE7
by edit these registry keys:
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet
Settings]
"ProxyEnable"=dword:00000001
"ProxyServer"="localhost:8118"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet
Settings\Connections]
"DefaultConnectionSettings"=hex:46,00,00,00,43,05, 00,00,03,00,00,00,0e,
00,00,00,6c,6f,63,61,6c,68,6f,73,74,3a,
38,31,31,38,00,00,00,00,00,00,00,00,00,00,00,00,00 ,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,0 0,00,00,00,00,00,*
00,00,00,00,00
But... the changes are not applyed in real-time in IE7, I have to open
an other browser for use the new settings.

I have add to my program a system messagge:

public enum SendMessageTimeoutFlags : uint
{
SMTO_NORMAL = 0x0000,
SMTO_BLOCK = 0x0001,
SMTO_ABORTIFHUNG = 0x0002,
SMTO_NOTIMEOUTIFNOTHUNG = 0x0008
}

[DllImport("user32.dll", SetLastError = true, CharSet =
CharSet.Auto)]
static extern IntPtr SendMessageTimeout(IntPtr hWnd, uint Msg,
UIntPtr wParam, UIntPtr lParam, SendMessageTimeoutFlags fuFlags, uint
uTimeout, out UIntPtr lpdwResult);

IntPtr HWND_BROADCAST = new IntPtr(0xffff);
IntPtr WM_SETTINGCHANGE = new IntPtr(0x001A);
[...]

SendMessageTimeout(HWND_BROADCAST, (uint)WM_SETTINGCHANGE,
UIntPtr.Zero, UIntPtr.Zero, SendMessageTimeoutFlags.SMTO_NORMAL, 1000,
out result);

But IE7 ignore the signal....

Do you have any suggestion for make active my changes in real-time?
Ciao!

Sep 24 '07 #1
12 7199
Hi,

You better post this message in one of the IE ng, or in a win32 API NG.

I do know that there is cases where this is the case, for example installing
google toolbar, if you have an open windows the toolbar does not appear
there.

"MC" <no*****@gmail.comwrote in message
news:11**********************@w3g2000hsg.googlegro ups.com...
Hi all,
I have write a simple program in c# that change proxy setting for IE7
by edit these registry keys:
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet
Settings]
"ProxyEnable"=dword:00000001
"ProxyServer"="localhost:8118"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet
Settings\Connections]
"DefaultConnectionSettings"=hex:46,00,00,00,43,05, 00,00,03,00,00,00,0e,
00,00,00,6c,6f,63,61,6c,68,6f,73,74,3a,
38,31,31,38,00,00,00,00,00,00,00,00,00,00,00,00,00 ,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,0 0,00,00,00,00,00,*
00,00,00,00,00
But... the changes are not applyed in real-time in IE7, I have to open
an other browser for use the new settings.

I have add to my program a system messagge:

public enum SendMessageTimeoutFlags : uint
{
SMTO_NORMAL = 0x0000,
SMTO_BLOCK = 0x0001,
SMTO_ABORTIFHUNG = 0x0002,
SMTO_NOTIMEOUTIFNOTHUNG = 0x0008
}

[DllImport("user32.dll", SetLastError = true, CharSet =
CharSet.Auto)]
static extern IntPtr SendMessageTimeout(IntPtr hWnd, uint Msg,
UIntPtr wParam, UIntPtr lParam, SendMessageTimeoutFlags fuFlags, uint
uTimeout, out UIntPtr lpdwResult);

IntPtr HWND_BROADCAST = new IntPtr(0xffff);
IntPtr WM_SETTINGCHANGE = new IntPtr(0x001A);
[...]

SendMessageTimeout(HWND_BROADCAST, (uint)WM_SETTINGCHANGE,
UIntPtr.Zero, UIntPtr.Zero, SendMessageTimeoutFlags.SMTO_NORMAL, 1000,
out result);

But IE7 ignore the signal....

Do you have any suggestion for make active my changes in real-time?
Ciao!
Sep 24 '07 #2
I wouldn't be surprized if you couldn't. Like Ignacio said, you will
probably have a better result in an IE newsgroup.

However, what I can tell you is that this isn't the way you should be
changing the settings. Rather, you should be using the InternetSetOption
API in the WinInet library. This might affect running instances, but I
can't say for sure.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"MC" <no*****@gmail.comwrote in message
news:11**********************@w3g2000hsg.googlegro ups.com...
Hi all,
I have write a simple program in c# that change proxy setting for IE7
by edit these registry keys:
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet
Settings]
"ProxyEnable"=dword:00000001
"ProxyServer"="localhost:8118"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet
Settings\Connections]
"DefaultConnectionSettings"=hex:46,00,00,00,43,05, 00,00,03,00,00,00,0e,
00,00,00,6c,6f,63,61,6c,68,6f,73,74,3a,
38,31,31,38,00,00,00,00,00,00,00,00,00,00,00,00,00 ,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,0 0,00,00,00,00,00,*
00,00,00,00,00
But... the changes are not applyed in real-time in IE7, I have to open
an other browser for use the new settings.

I have add to my program a system messagge:

public enum SendMessageTimeoutFlags : uint
{
SMTO_NORMAL = 0x0000,
SMTO_BLOCK = 0x0001,
SMTO_ABORTIFHUNG = 0x0002,
SMTO_NOTIMEOUTIFNOTHUNG = 0x0008
}

[DllImport("user32.dll", SetLastError = true, CharSet =
CharSet.Auto)]
static extern IntPtr SendMessageTimeout(IntPtr hWnd, uint Msg,
UIntPtr wParam, UIntPtr lParam, SendMessageTimeoutFlags fuFlags, uint
uTimeout, out UIntPtr lpdwResult);

IntPtr HWND_BROADCAST = new IntPtr(0xffff);
IntPtr WM_SETTINGCHANGE = new IntPtr(0x001A);
[...]

SendMessageTimeout(HWND_BROADCAST, (uint)WM_SETTINGCHANGE,
UIntPtr.Zero, UIntPtr.Zero, SendMessageTimeoutFlags.SMTO_NORMAL, 1000,
out result);

But IE7 ignore the signal....

Do you have any suggestion for make active my changes in real-time?
Ciao!
Sep 24 '07 #3
MC
On 24 Set, 07:47, "Nicholas Paldino [.NET/C# MVP]"
Rather, you should be using the InternetSetOption
API in the WinInet library. This might affect running instances, but I
can't say for sure.
Yes.... is it the only (and correct) way for change proxy settings
without having to restart Internet Explorer.... :-((((((

I have to rewrite my little tool....

thank you!

Ciao!


Sep 24 '07 #4
I have a custom application built running on my desktop, there's no way to
do this live. You have to close and re-open the browser or run a new
instance of IE. Even opening a new tab doesn't do the trick.

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
OWC Black Book 2nd Edition coming soon.
"MC" <no*****@gmail.comwrote in message
news:11**********************@57g2000hsv.googlegro ups.com...
On 24 Set, 07:47, "Nicholas Paldino [.NET/C# MVP]"
>Rather, you should be using the InternetSetOption
API in the WinInet library. This might affect running instances, but I
can't say for sure.

Yes.... is it the only (and correct) way for change proxy settings
without having to restart Internet Explorer.... :-((((((

I have to rewrite my little tool....

thank you!

Ciao!


Sep 25 '07 #5
MC
On 24 Set, 17:25, "Alvin Bruney [MVP]" <some guy without an email
addresswrote:
I have a custom application built running on my desktop, there's no way to
do this live. You have to close and re-open the browser or run a new
instance of IE. Even opening a new tab doesn't do the trick.
No dear Alvin!
I have just rewrite my application using WinINet API (always with C# )
and now I can change proxy settings without having to restart IE.

I have used InterntOption with options:
INTERNET_OPTION_SETTINGS_CHANGED
INTERNET_OPTION_REFRESH

for applying real-time configuration settings, and:
INTERNET_PER_CONN_FLAGS
INTERNET_PER_CONN_PROXY_SERVER
for enable and set proxy server name.

You can use an hybrid app that use registry keys for setting proxy
name and anable it, and the InternetOptions:
INTERNET_OPTION_SETTINGS_CHANGED
INTERNET_OPTION_REFRESH
for apply changes without restart IE.

Ciao!!

Sep 25 '07 #6
Hi

Is your tool available?

I have the same problem.

--
TIA

Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc. (http://www.emoreau.com)
Membre du réseau .NET Expertise www.dotnet-expertise.com
"MC" <no*****@gmail.comwrote in message
news:11**********************@w3g2000hsg.googlegro ups.com...
On 24 Set, 17:25, "Alvin Bruney [MVP]" <some guy without an email
addresswrote:
>I have a custom application built running on my desktop, there's no way
to
do this live. You have to close and re-open the browser or run a new
instance of IE. Even opening a new tab doesn't do the trick.

No dear Alvin!
I have just rewrite my application using WinINet API (always with C# )
and now I can change proxy settings without having to restart IE.

I have used InterntOption with options:
INTERNET_OPTION_SETTINGS_CHANGED
INTERNET_OPTION_REFRESH

for applying real-time configuration settings, and:
INTERNET_PER_CONN_FLAGS
INTERNET_PER_CONN_PROXY_SERVER
for enable and set proxy server name.

You can use an hybrid app that use registry keys for setting proxy
name and anable it, and the InternetOptions:
INTERNET_OPTION_SETTINGS_CHANGED
INTERNET_OPTION_REFRESH
for apply changes without restart IE.

Ciao!!

Sep 25 '07 #7
MC
On 25 Set, 03:08, "Eric Moreau" <eric.moreau_NO_SP...@videotron.ca>
wrote:
Hi
Is your tool available?
;-)

Yes,
but you have to wait a few days for bug fixing.

Ciao!!!!
Sep 25 '07 #8
MC
Ok Guys,
you can try it!

http://www.redtomahawk.com/xml/prod/TorActivator.html

The installation is a fake. Or to be more precise, the installation
procedure do:
1. Extract files:
1.1. TOR_Activator.dll
1.2. TOR_Activator_GUI.exe
1.3. data\proxy.xml
2. Put this files in your favorite location (default: <ProgramFiles>
\RedTomahawk.Com\TOR Activator for IE7\data)
3. Create Menů Shortcut.
4. Done.

If you want, after installation, you can redistribute the software by
copy/paste of the installation folder.

Hey Guys, don't panic, "TOR Activator" is a little little tool not
still fully debugged.

Bye!

PS: the firm RedTomahawk.com is another fake... :-) It's my
hobby ;-))))

On 25 Set, 12:24, MC <nous...@gmail.comwrote:
[...]

Sep 25 '07 #9
Hi

It doesn't work for me. I have added http://fastweb.bell.ca:8083/ in the
list of proxy and when I click the enabled checkbox I see a hourglass but it
never change the settings in IE 7 (even if IE is closed at that time).

I also tried to remove the http:// without success.
--
Thanks

Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc. (http://www.emoreau.com)
Membre du réseau .NET Expertise www.dotnet-expertise.com
"MC" <no*****@gmail.comwrote in message
news:11*********************@n39g2000hsh.googlegro ups.com...
Ok Guys,
you can try it!

http://www.redtomahawk.com/xml/prod/TorActivator.html

The installation is a fake. Or to be more precise, the installation
procedure do:
1. Extract files:
1.1. TOR_Activator.dll
1.2. TOR_Activator_GUI.exe
1.3. data\proxy.xml
2. Put this files in your favorite location (default: <ProgramFiles>
\RedTomahawk.Com\TOR Activator for IE7\data)
3. Create Menů Shortcut.
4. Done.

If you want, after installation, you can redistribute the software by
copy/paste of the installation folder.

Hey Guys, don't panic, "TOR Activator" is a little little tool not
still fully debugged.

Bye!

PS: the firm RedTomahawk.com is another fake... :-) It's my
hobby ;-))))

On 25 Set, 12:24, MC <nous...@gmail.comwrote:
[...]
Sep 26 '07 #10
MC
On 26 Set, 02:14, "Eric Moreau" <eric.moreau_NO_SP...@videotron.ca>
wrote:
It doesn't work for me. I have added http://fastweb.bell.ca:8083/in the
list of proxy and when I click the enabled checkbox I see a hourglass but it
never change the settings in IE 7 (even if IE is closed at that time).

I also tried to remove the http:// without success.
You haven't to insert the "http://"...":8083/". In fact if you try to
insert "http://fastweb.bell.ca:8083/" in IE7, it truncate the address
automatically in "fastweb.bell.ca" and write "8080" in the port
textbox.

Did you try to insert only "fastweb.bell.ca:8083" ?
I have to write a little how-to... :-)

You can write me you PC configuration(winxp, vista, you are the
machine admin )?

Bye!!!

Sep 26 '07 #11
MC
On 26 Set, 20:16, MC <nous...@gmail.comwrote:
On 26 Set, 02:14, "Eric Moreau" <eric.moreau_NO_SP...@videotron.ca>
wrote:
It doesn't work
I have verifyed... it is a bug. try to insert only: fastweb.bell.ca:
8083

Sep 26 '07 #12

Ciao :-)
i have changed the proxy server using registry, but i cannot reach to
change proxy settings without having to restart IE ???
Could you post here your C# code for change proxy settings without
having to restart IE ???
Thanks in advance
*** Sent via Developersdex http://www.developersdex.com ***
Oct 2 '07 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Alexandr Molochnikov | last post by:
Hello group, I am trying to cut down the number of ports that must be opened in a firewall to let the client talk to the protected server. The server runs its own registry process by calling...
4
by: sonic_soul | last post by:
Hi, I was curious if I could make my webservice work with firefox client webservice functionality. (i got it to work with webservice.htc) I am able to get firefox to see my serverside web...
1
by: Zürcher See | last post by:
I'm trying to set a value in the registry in order to configure IE so that it uses a proxy I found out that there are two values: ...
10
by: Clint | last post by:
Hey all - I'm having a really confusing problem concerning a web service. Right now, I have an application that needs to call a web service that does nothing but return "true" (this will...
1
by: DWrek | last post by:
Hi Everyone, I have a .NET dll that uses the HTTPWebRequest class to make an HTTP connection to an off-site server. This dll works just fine from a Winform but when I try to use it from an ASP...
4
by: Morten Snedker | last post by:
I'm trying to download a file. I've tried both using webclient and the httpWebRequest. Either way it returns a "407 proxy authentication required". The program is to be run externally, so...
4
by: Sharon | last post by:
Hi all, Can any one explain the relationship between real & transparent proxy? I couldn't fully understand it from the explanation at MSDN. Thanks, Sharon.
0
Kevinyy
by: Kevinyy | last post by:
Is it possible to set up the default web proxy with password(no username) in the registry? if not, feed in proxy setting with password to FF/IE? - with a c# program?
0
hsn
by: hsn | last post by:
hello everyone. i am trying to enable or disable the proxy in my vista os. i have the command right here. reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.