How to close application on Windows?

Discussion in 'Ruby' started by olek, Jul 1, 2004.

  1. olek

    olek Guest

    Hi,
    I need to open some application from ruby on WinXP, get some action
    connected to that app. and close it.

    thread= Thread.new(0) {
    system("abt.exe") # opening my app.
    }
    sleep(20) # time for start abt.exe
    #getting data from abt.exe
    system("hptcmd export")
    #closing abt.exe - it doesn't work!!!!
    Thread.kill(thread)
    #abt.exe still active

    Maybe I should kill a procces connected to that application so the
    application would be closed ....?

    Thanks for every advice
    Mariusz
     
    olek, Jul 1, 2004
    #1
    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. Denon
    Replies:
    1
    Views:
    582
    Saravana [MVP]
    Nov 14, 2003
  2. Replies:
    6
    Views:
    8,843
    sateeshranga
    Aug 7, 2008
  3. Dani
    Replies:
    3
    Views:
    488
  4. Iñaki Baz Castillo
    Replies:
    7
    Views:
    874
    Iñaki Baz Castillo
    Jan 12, 2010
  5. Replies:
    3
    Views:
    412
    Chung Leong
    Jan 16, 2005
Loading...

Share This Page