Solved

Scheduling an exe (emoreau's example)

Posted on 2013-01-07
5
200 Views
Last Modified: 2013-01-08
I've followed this code

http://emoreau.com/Entries/Articles/2008/11/Passing-arguments-to-an-application-startup.aspx

Method 2 of that link. I compiled and have an exe. I want to schedule it as a Service. Per that article, I need to pass a paramter '/batch' to have it run as a service...

When I'm in debug, I add the command line argument to "Debug" tab of properties. When I want to schedule the exe...where do I need to put the command line argument?

Thanks
0
Comment
Question by:Camillia
  • 2
  • 2
5 Comments
 
LVL 17

Assisted Solution

by:Kent Dyer
Kent Dyer earned 250 total points
Comment Utility
Depends on where you are running the scheduled task..

Windows XP or 2000/2003 would take the switch on the same command line..

I think Windows 2008 has a place for parameters..
Same with Task Scheduler Professional..

Have a look at SCHTASKS.exe to set this up...
http://ss64.com/nt/schtasks.html

HTH,

Kent
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
are you creating your task manually in the Windows "Task Scheduler"? If so, you can add your argument to name of the exe.

or you can create a batch file with that argument and launch the batch in the task
0
 
LVL 7

Author Comment

by:Camillia
Comment Utility
I think I will use Windows Task Scheduler. I've never done this before tho. What do you mean adding it to the name of the exe?  I know if I right click on the exe, select "properties", there's a "Target" field and I can add the paramter to end of it. Is this what you mean?
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 250 total points
Comment Utility
the task scheduler screens varies according to the version of windows you are using

whatever the version your are using, there is a place where you set the full path of your exe. you can add /batch at the end
0
 
LVL 7

Author Comment

by:Camillia
Comment Utility
i will look. I will keep this question open for now. Thanks for your help.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now