how to run applications in windows using perl scripting

Discussion in 'Perl Misc' started by hara, May 10, 2006.

  1. hara

    hara Guest

    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
     
    hara, May 10, 2006
    #1
    1. Advertising

  2. "hara" <> 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/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 <>
    (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
     
    A. Sinan Unur, May 10, 2006
    #2
    1. Advertising

  3. hara

    hara Guest

    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.
     
    hara, May 11, 2006
    #3
  4. "hara" <> 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 <>
    (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
     
    A. Sinan Unur, May 11, 2006
    #4
  5. hara

    Thiagu.M Guest

    "hara" <> 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
     
    Thiagu.M, May 18, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wolfgang
    Replies:
    5
    Views:
    1,481
    Tris Orendorff
    Feb 19, 2004
  2. Ron Stephens
    Replies:
    23
    Views:
    2,857
    Ron Stephens
    Apr 12, 2004
  3. DaveInSidney
    Replies:
    0
    Views:
    423
    DaveInSidney
    May 9, 2005
  4. alexander_baranovsky

    paxCompiler for scripting C++ applications

    alexander_baranovsky, May 26, 2006, in forum: C++
    Replies:
    1
    Views:
    551
    mlimber
    May 26, 2006
  5. Anil
    Replies:
    1
    Views:
    444
    Jean-Luc David [MS-MVP]
    Jul 31, 2004
Loading...

Share This Page