CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Win32 Programming Help:
Starting up an external program with Win32::Process::Create fails for some, no others?

 



1bru1
New User

Dec 22, 2011, 3:16 PM

Post #1 of 1 (8307 views)
Starting up an external program with Win32::Process::Create fails for some, no others? Can't Post

I know there are other things I can call, but either they block the script from continuing, or I don't have the module in my ActivePerl install (64-bit v5.14.2.1402). Really I just don't see why I shouldn't be able to use this call. It is working for some programs that I call, but not for others.

The EXEs that don't work do have one thing in common, and different than the others that do work. That is when they are executed a Windows UAC dialog pops up asking me if I want to allow this "unknown publisher" to make changes. I made them all run "As Administrator" and turned UAC completly off, but neither of those changes helped.

Any ideas? Here is the error I get and the code:



Code
 Died at library/OpenWinsBurning/ShortCutter.pm line 143.   

while executing
"::perl::CODE(0x4042cd8)"
invoked from within
".f3.b9 invoke"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list $w invoke]"
(procedure "tk::ButtonUp" line 24)
invoked from within
"tk::ButtonUp .f3.b9"
(command bound to event)



Code
 sub execute {  
my $this = shift; ## get ref to calling object
my $exitStat = 0;

## This is how you execute another program, and it NOT block the current script
## (as opposed to system()).
my $proc;
Win32::Process::Create(
$proc,
$this->{mLink}->{'Path'},
"",
0,
NORMAL_PRIORITY_CLASS,
$this->{mLink}->{'WorkingDirectory'}
) || die $this->errorReport();

return $exitStat;
}


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives