If you have the system.adm file from an active directory server, you can see how that sets the value. IF you are using a 200/2003 server not in AD, you can apply that adm locally, or just use AD GPOs to keep it simple. IF this is your environment to begin with.
-----Original Message----- From: $Bill Luebkert [mailto:[EMAIL PROTECTED] Sent: Friday, April 08, 2005 6:52 AM To: Ing. Branislav Gerzo (mail-lists) Cc: perl-win32-users@listserv.ActiveState.com Subject: Re: change IE proxy settings Ing. Branislav Gerzo (mail-lists) wrote: > Hello, > > I have to change IE proxy settings via perl interface. I searched the > web for a long time, found something, coded too, but it doesn't work > :) > > ok, my goal is enable, or disable proxy in IE. Here is code: > > use strict; > use warnings; > use Win32::TieRegistry( Delimiter=>"/", ArrayValues=>0 ); > use Win32::API; > > #proxy in IE is disabled now > my $regpath = 'HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Internet Settings/'; > my $penable = $regpath . 'ProxyEnable'; > $Registry->{$penable}= '0x00000001'; > print my $pe = $Registry->{$penable}; #prints '0x00000001', so value is stored > my $InternetSetOption = Win32::API->new("wininet", "InternetSetOption", [qw(N N N N)], 'N'); > $InternetSetOption->Call(0, 39, 0, 0) || die "$!\n"; > $InternetSetOption->Call(0, 37, 0, 0) || die "$!\n"; Check out Win32::Internet instead of using the API: use strict; use warnings; use Win32::Internet; use Win32::TieRegistry (Delimiter => '/', ArrayValues => 0); # proxy in IE is disabled now my $regpath = 'HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Internet Settings'; my $penable = "$regpath/ProxyEnable"; my $pe = $Registry->{$penable}; print "pe=$pe\n"; $Registry->{$penable} = '0x00000001'; $pe = $Registry->{$penable}; print "pe=$pe\n"; # try something like this instead of API (check docs in Win32::Internet) # you'll have to play with it to get the desired results I assume - I have # no experience with it. my $I = new Win32::Internet('', INTERNET_OPEN_TYPE_PROXY, '<your-proxy-host>') or die "new Win32::Internet: $! ($^E)"; __END__ -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff) _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs