how to run applications in windows using perl scripting

H

hara

Hi,

I am using perl from last 3-4 months. I know the basics of perl. For
testing purpose i want to run an application let it be quake 3 demo for
30 minutes using perl.

The quake 3 demo is there in "c" drive. How will open and run the
aplication using perl script.

Is there any modules which I have to install?

regards
 
A

A. Sinan Unur

I am using perl from last 3-4 months. I know the basics of perl. For
testing purpose i want to run an application let it be quake 3 demo for
30 minutes using perl.

The quake 3 demo is there in "c" drive. How will open and run the
aplication using perl script.

Is there any modules which I have to install?

http://search.cpan.org/~gsar/libwin32-0.191/Process/Process.pm

#!/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 );


__END__


--
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

Thanks a lot Sinan,

I want one more favour.
I want to copy the builds from a certain path in the server to my local
machine.
I.e backup type of thing.
In every 2 days I use to get a build .If today it is 2.1 then the next
will be 2.2.
I want a perl script which can copy the latest version as soon as it
comes to the server to the local machine.

Can it be possible to do that.
 
A

A. Sinan Unur

Thanks a lot Sinan,

Well, you are welcome I guess.
I want one more favour.

I see.
I want to copy the builds from a certain path in the server to my
local machine. I.e backup type of thing.

What is stopping you?
In every 2 days I use to get a build .If today it is 2.1 then the next
will be 2.2.
I want a perl script which can copy the latest version as soon as it
comes to the server to the local machine.

Can it be possible to do that.

Anything is possible. First, write a script that checks if a more recent
version is available, and if so, copies the files to the appropriate
location.

Then, use your operating system's facilities to run this script
periodically, say, every five minutes.

Please do read the posting guidelines before you post again.

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
 
T

Thiagu.M

I want to copy the builds from a certain path in the server to my
local machine. I.e backup type of thing.

Hi hara
u can use robocopy.exe,a tool provided in the windows 2003
resource kit for taking backup of updated files.it will work also in
windows 2000.(It will not be in windows2000 resource kit,just copy
from windows2003 OS).

Thanks,
Thiagu.M
Kambainallur
 

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

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top