in reply to Re: system command
in thread system command
If you want to start a process with Win32::Process you need to pass full-qualified executable name, which is usually unknown. In this case Win32::SearchPath is helpful. Find out the path to the executable:
The module checks either the path in the same way as Windows does or let you specify directories where to look:my $cmd = Win32::SearchPath::SearchPath('ipconfig');
my $cmd = Win32::SearchPath::SearchPath('ipconfig', 'C:\Windows');
Then you start the process as you want using Win32::Process:
Win32::Process::Create( $ProcessObj, $cmd, '/all', 0, IDLE_PRIORITY_CL +ASS, "." ) || die "error running process";
|
|---|