running 2 or more application in windows using perl

H

hara

#!/usr/bin/perl

use strict;
use warnings;

use Win32::process;

sub get_formatted_error {
Win32::FormatMessage( Win32::GetLastError() );
}


my $process;
Win32::process::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::process 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::process module.
 
A

A. Sinan Unur

@y43g2000cwc.googlegroups.com:

....
with regard to above script

That is the script I had posted in response to another question of
yours.
i want to add something.

using Win32::process 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::process module.

What happened when you tried? Or, do you just want to have other people
do all your work?

Sinan

--
A. Sinan Unur <[email protected]>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
 
H

hara

As per the module instructions we can pass only one command line
argument.

So i tried that but showing the below mentioned error.

aborted due to compilation error.
I read the whole module help but it didn't help.

regards
 
B

Brian McCauley

hara said:
As per the module instructions we can pass only one command line
argument.

So i tried that but showing the below mentioned error.

aborted due to compilation error.
I read the whole module help but it didn't help.

We'll the code you posrted worked fine for me.

The error "aborted due to compilation error" on it's own does not look
like a Perl error.

Are you sure that was the exact and entire message?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top