Re: Internet Explorer Settings
by Administrador other posts by this author
Feb 27 2004 9:35PM messages near this date
Re: MSaccess Module
|
lwp and https
Sam
I dont know how to do this.
i am interest in making my own script that makes somthing.
so ... could you please tell me which module are you using?
i haved searched in cpan.org but returns me not only one.
Regards
René
----- Original Message -----
From: <sam.dela.cruz@[...].com>
To: <activeperl@[...].com>
Sent: Friday, February 27, 2004 2:01 PM
Subject: Internet Explorer Settings
> Hi All,
>
> Is there a way to pre-configure Internet Explorer Proxy settings and home
> page address for all users on a Windows machine? Even those users who are
> logging in for the first time? I tried to setup Internet Explorer via
> Registry but for some reason, the settings are not being used for users
> who logged in for the first time. The script is intended for setting up a
> new machine for a user, post configuration details.
>
> Do you guys have any alternative, can this be done using WMI?
>
> I have the following code:
>
> #Set Proxy
> my $path_proxy = "Software\\Microsoft\\Windows\\CurrentVersion\\Internet
> Settings";
> my $value_proxy = 'AutoConfigURL';
> my $proxy = 'http://proxy.acme.com';
> set_ie($path_proxy,$value_proxy,$proxy);
>
> #Set HomePage
> my $path_homepage = "Software\\Microsoft\\Internet Explorer\\Main";
> my $value_homepage = 'Start Page';
> my $homepage = 'http://homepage.net';
> set_ie($path_homepage,$value_homepage,$homepage);
>
> sub set_ie
> {
> my ($path,$value,$data) = @_;
> my $flag = 0;
>
> $HKEY_USERS->Open("", my $main_key);
> my @keylist;
> $main_key->GetKeys( \@keylist );
>
> foreach (@keylist)
> {
> if ($main::HKEY_USERS->Open("$_\\$path", my $key))
> {
> unless ($key->SetValueEx($value, 0, REG_SZ, $data))
> {
> $flag++;
> }
> }
> }
>
> if ($HKEY_LOCAL_MACHINE->Open($path, my $root))
> {
> unless ($root->SetValueEx($value, 0, REG_SZ, $data))
> {
> $flag++;
> }
> }
>
> if ($HKEY_CURRENT_USER->Open($path, my $root))
> {
> unless ($root->SetValueEx($value, 0, REG_SZ, $data))
> {
> $flag++;
> }
> }
>
> unless ($flag)
> {
> record_log("Set $value to $data\n",0);
> }
> else
> {
> record_log("Not able to set $value to $data: $!\n",1);
> }
> }
>
> Regards,
> Sam Dela Cruz
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@[...].com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
|