Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   how to run applications in windows using perl scripting (http://www.velocityreviews.com/forums/t897894-how-to-run-applications-in-windows-using-perl-scripting.html)

hara 05-10-2006 12:05 PM

how to run applications in windows using perl scripting
 
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. Sinan Unur 05-10-2006 02:18 PM

Re: how to run applications in windows using perl scripting
 
"hara" <hara.acharya@gmail.com> wrote in news:1147262700.609370.214290
@i39g2000cwa.googlegroups.com:

> 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/libwin3...ess/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 <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

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


hara 05-11-2006 06:18 AM

Re: how to run applications in windows using perl scripting
 
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. Sinan Unur 05-11-2006 01:30 PM

Re: how to run applications in windows using perl scripting
 
"hara" <hara.acharya@gmail.com> wrote in news:1147328321.964889.131790
@q12g2000cwa.googlegroups.com:

> 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 <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

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


Thiagu.M 05-18-2006 12:53 PM

Re: how to run applications in windows using perl scripting
 
"hara" <hara.acha...@gmail.com> wrote in news:1147328321.964889.131790
@q12g2000cwa.googlegroups.com:

> 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



All times are GMT. The time now is 03:23 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.