[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 530
  • Last Modified:

Start a task batch file

I need a batch file to start a task. This batch file will stop it so I need something similar to start it.

taskkill /f /IM iqalert.exe

Or simply a way to start this program with a batch file

"C:\Program Files\IQMS\IQWin32\IQAlert.exe" auto

Can anyone help me with this?
0
Gerhardpet
Asked:
Gerhardpet
  • 3
  • 2
1 Solution
 
Brian GeeCommented:
Try this:

@echo off
start "" "C:\Program Files\IQMS\IQWin32\IQAlert.exe"

Open in new window

0
 
GerhardpetAuthor Commented:
Do you know if I can have the auto behind it? Like so?

 
@echo off
start "" "C:\Program Files\IQMS\IQWin32\IQAlert.exe" auto

Open in new window


For some reason the program need to have the auto switch to wrok properly.
0
 
Brian GeeCommented:
If you say you need it in order to have it run and the program knows how to interpret that parameter, I'd say go for it. Test it out to see if the batch file with your included parameter works.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
AriMcCommented:
I think the first pair of parenthesis is unnecessary, just try this:

@echo off
start "C:\Program Files\IQMS\IQWin32\IQAlert.exe" auto

Open in new window

0
 
GerhardpetAuthor Commented:
Yep it works fine. Thank you!
0
 
Brian GeeCommented:
@Gerhardpet: Thanks for the accept.

@AriMc: Since the path is in quotes, the way you recommended had the path treated as a title rather than a command.
0

Featured Post

A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now