|
|
Question : Kicking off an Internet Explorer windows
|
|
Hello there,
I am working with Bloomberg to get around a Citrix session problem that we have between Bloomberg and our firewall.
I have a script that I've written that I want to use to open an explorer window and go to a particular page, change a proxy setting, sleep for 45 seconds and then change the proxy setting back.
What I am looking to do is:
Open website Disable Proxy settings Wait 45 secs Renable proxy settings
So I have:
Command that opens Internet Explorer and the website to go to (from a DOS prompt - if another way, I'm open to it) "C:\Program Files\Internet Explorer\iexplore.exe" "https://bba.bloomberg.net/login.asp?ClientDetection=On"
PERL SCRIPT THAT I WILL COMPILE use Win32::TieRegistry ( Delimiter=>"/", ArrayValues=>1 );
<<>>>>
# Opening Keys $Registry->Delimiter("/"); # Set delimiter to "/". $swKey= $Registry->{"LMachine/Software/"}; $winKey= $swKey->{"Microsoft/Windows/CurrentVersion/Internet Settings"};
# Reading Values $ProxySet= $winKey->{"/ProxySettings"}; # Proxy Enabled or Disabled print "$ProxySet \n" ;
#Disable Proxy Server to allow Citrix session to launch without going through Proxy $winKey->{"/ProxySettings"}= "0"; # Simple. Assumes data type of REG_SZ.
#Sleep for 45 seconds to allow user input sleep 45;
#Reset Proxy Server value to allow browsing of the internet $winKey->{"/ProxySettings"}= "1"; # Simple. Assumes data type of REG_SZ.
<<>>>
# Closing keys exit 0; # Implicitly closes all keys.
Help would be GREATLY appreciated.
Thank you.
Howard [email protected]
|
Answer : Kicking off an Internet Explorer windows
|
|
try...
use Win32::Process; use Win32;
## Start iexplorer Win32::Process::Create($ProcessObj, "C:/Program Files/Internet Explorer/IEXPLORE.EXE", "iexplore https://bba.bloomberg.net/login.asp?ClientDetection=On", 0, NORMAL_PRIORITY_CLASS, ".") || die Win32::FormatMessage( Win32::GetLastError() );
## yada yada yada sleep 45;
## Stop iexplorer $ProcessObj->Kill(0);
|
|
|
|
|