Launching an .exe
From: lmm (no email)
Date: 02/10/04
- Next message: fishfry: "Re: Why is Perl losing ground?"
- Previous message: nj_perl_newbie: "Re: Comparing a string to filenames in a directory"
- Next in thread: Ben Morrow: "Re: Launching an .exe"
- Reply: Ben Morrow: "Re: Launching an .exe"
- Reply: Jürgen Exner: "Re: Launching an .exe"
- Reply: Bart Lateur: "Re: Launching an .exe"
- Reply: Jon Landenburer: "Re: Launching an .exe"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 10 Feb 2004 14:42:02 -0500
I have written a script that that is supposed write a host file, open
a Windows executable file, sends out a few pings and then runs a batch
file that maps drives.
The problem I am having is that the the script stops after the
executable is launched. Presumably because it does not close and
therefore the script "hangs." The .exe is a VPN client so it cannot
run last. When I decided to add the pings and the batch file the
script stopped working, of course now I realize it was never working
as expected.
I have tried the following code to launch the exe:
my $exe = '"C:/Program Files/SonicWALL/SonicWALL Global VPN
Client/SWGVpnClient.exe"' ;
exec $exe ;
I also tried putting the above in a separate script and then a batch
file and having the script launch that and finally what is written
below. So I guess I need a way to launch the exe and then have the
Perl script move forward.
if ($loc eq "n") {
print "Writing the non-VPN hosts file.\n" ;
print HOSTS $not ; #write the file
print "Wrote non-VPN hosts file.\nYou may close this window by
typing exit or clicking the X\n" ;
} else {
print "Writing the VPN hosts file.\n" ;
print HOSTS $vpn ; #write the file
#opens the VPN Client software
print `C:/Program Files/SonicWALL/SonicWALL Global VPN
Client/SWGVpnClient.exe` ;
print `ping -n 10 gwdc` ;
print `C:/VPN/BAT//WIN2KLOGONFDQN.BAT` ;
print "Wrote VPN hosts file and executed LOGON script.\nYou may
close this window by clicking the X\n" ;
}
- Next message: fishfry: "Re: Why is Perl losing ground?"
- Previous message: nj_perl_newbie: "Re: Comparing a string to filenames in a directory"
- Next in thread: Ben Morrow: "Re: Launching an .exe"
- Reply: Ben Morrow: "Re: Launching an .exe"
- Reply: Jürgen Exner: "Re: Launching an .exe"
- Reply: Bart Lateur: "Re: Launching an .exe"
- Reply: Jon Landenburer: "Re: Launching an .exe"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|