Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > changes on windows registry doesn’t take effect immediately

Reply
Thread Tools

changes on windows registry doesn’t take effect immediately

 
 
iMath
Guest
Posts: n/a
 
      03-15-2013
changes on windows registry doesn’t take effect immediately

I am trying to change IE’s proxy settings by the following 2 code snippets

to enable the proxy by this code

from winreg import *
with OpenKey(HKEY_CURRENT_USER,r"Software\Microsoft\Win dows\CurrentVersion\Internet Settings" ,0, KEY_ALL_ACCESS) as key:
SetValueEx(key,"ProxyServer",0, REG_SZ, "127.0.0.1:8087")
SetValueEx(key,"ProxyEnable",0, REG_DWORD, 1)
SetValueEx(key,"ProxyOverride",0, REG_SZ, "<local>")
FlushKey(key)

to disable the proxy by this code

from winreg import *
with OpenKey(HKEY_CURRENT_USER,r"Software\Microsoft\Win dows\CurrentVersion\Internet Settings" ,0, KEY_ALL_ACCESS) as key:

DeleteValue(key,"ProxyServer")
SetValueEx(key,"ProxyEnable",0, REG_DWORD, 0)
DeleteValue(key,"ProxyOverride")
FlushKey(key)

but the changes on windows registry doesn’t take effect immediately,so isthere some way to change the windows registry and let the changes take effect immediately without restarting IE ?

BTW ,I use the code on winxp ,and I am going to embed the 2 code snippets in my PyQt application .
 
Reply With Quote
 
 
 
 
Steven D'Aprano
Guest
Posts: n/a
 
      03-15-2013
On Thu, 14 Mar 2013 22:26:50 -0700, iMath wrote:

> changes on windows registry doesn’t take effect immediately
>
> I am trying to change IE’s proxy settings by the following 2 code
> snippets

[...]
> but the changes on windows registry doesn’t take effect immediately,so
> is there some way to change the windows registry and let the changes
> take effect immediately without restarting IE ?


That's an IE question, not a Python question. You might be lucky and have
somebody here happen to know the answer, but you'll probably have more
luck asking on a group dedicated to Windows and IE.



--
Steven
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
In place upgrade Windows 2000 - effect on registry settings, grouppolicy BertieBigBollox@gmail.com Computer Support 13 11-12-2009 08:08 PM
Effect.SlideUp is too slow--next statement executes immediately nolo contendere Javascript 7 11-09-2007 08:44 PM
Immediately display changes to an HTML element Hoss Javascript 5 02-23-2006 06:16 AM
How the Global.asa file changes will take effect? Prabhat ASP General 5 10-11-2005 10:37 AM
How to make changes made to a component be updated immediately Ingvar Nilsen ASP .Net Building Controls 3 12-20-2004 05:49 PM



Advertisments