Command line stop compiled macro

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Reimon
Pro Scripter
Posts: 55
Joined: Wed Mar 31, 2004 4:46 pm

Command line stop compiled macro

Post by Reimon » Wed Sep 30, 2009 5:17 pm

Hello !!!

Is possible to stop compiled macro with command line command ?

Thanks and geetings,

Reimon

Reimon
Pro Scripter
Posts: 55
Joined: Wed Mar 31, 2004 4:46 pm

Command line stop compiled macro

Post by Reimon » Wed Sep 30, 2009 6:14 pm

Hello !!!

I have found taskkill command.

Any other idea ?

Greetings,

Reimon

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Sep 30, 2009 7:02 pm

If you're looking to stop an executable from the DOS command line or from "Start">"Run" then I'd use taskkill.

taskkill /F /IM process name

If you're looking for a macro scheduler solution you can use taskkill or a VBScript solution that Marcus posted HERE.

Code: Select all

Let>RP_WAIT=1
Let>RP_WINDOWMODE=0
RunProgram>cmd /c taskkill /F /IM process name
Or

Code: Select all

VBSTART
Sub killProcess(pgm)
  set wmi = getobject("winmgmts:")
  sQuery = "select * from win32_process " & "where name='" & pgm & "'"
  set processes = wmi.execquery(sQuery)
  for each process in processes
    process.terminate
  next
End Sub
VBEND

VBRun>Killprocess,process name

Reimon
Pro Scripter
Posts: 55
Joined: Wed Mar 31, 2004 4:46 pm

Very thanks JRL

Post by Reimon » Sat Oct 03, 2009 8:56 am

Very thanks JRL.

Greetings,

Reimon

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts