Win32::Process - Create and manipulate processes.
sub ErrorReport{ print Win32::FormatMessage( Win32::GetLastError() ); } Win32::Process::Create($ProcessObj, "D:\\winnt35\\system32\\notepad.exe", "notepad temp.txt", 0, NORMAL_PRIORITY_CLASS, ".")|| die ErrorReport(); $ProcessObj->Suspend(); $ProcessObj->Resume(); $ProcessObj->Wait(INFINITE);
This module allows for control of processes in Perl.
Creates a new process.
Args: $obj container for process object $appname full path name of executable module $cmdline command line args $iflags flag: inherit calling processes handles or not $cflags flags for creation (see exported vars below) $curdir working dir of new process
Suspend the process associated with the $ProcessObj.
Resume a suspended process.
Kill the associated process, have it die with exit code $ExitCode.
Get the priority class of the process.
Set the priority class of the process (see exported values below for options).
Get the process affinity mask. This is a bitvector in which each bit represents the processors that a process is allowed to run on.
Set the process affinity mask.
Retrieve the exitcode of the process.
Wait for the process to die. forever = INFINITE
To install Win32, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32
CPAN shell
perl -MCPAN -e shell install Win32
For more information on module installation, please visit the detailed CPAN module installation guide.