H
hara
#!/usr/bin/perl
use strict;
use warnings;
use Win32:rocess;
sub get_formatted_error {
Win32::FormatMessage( Win32::GetLastError() );
}
my $process;
Win32:rocess::Create(
$process,
"C:\\Windows\\system32\\notepad.exe",
"notepad.exe test.txt",
0,
NORMAL_PRIORITY_CLASS,
".",
) or die get_formatted_error();
sleep 5;
$process->Kill( 0 );
===================================================================
with regard to above script
i want to add something.
using Win32:rocess module
can i run 2 or more commands from command line
like
notepad.exe temp.txt
then i want to run a batch file like b.bat.
is it possible to do that using Win32:rocess module.
use strict;
use warnings;
use Win32:rocess;
sub get_formatted_error {
Win32::FormatMessage( Win32::GetLastError() );
}
my $process;
Win32:rocess::Create(
$process,
"C:\\Windows\\system32\\notepad.exe",
"notepad.exe test.txt",
0,
NORMAL_PRIORITY_CLASS,
".",
) or die get_formatted_error();
sleep 5;
$process->Kill( 0 );
===================================================================
with regard to above script
i want to add something.
using Win32:rocess module
can i run 2 or more commands from command line
like
notepad.exe temp.txt
then i want to run a batch file like b.bat.
is it possible to do that using Win32:rocess module.