Solved

Scheduling an exe (emoreau's example)

Posted on 2013-01-07
5
203 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
ID: 38752551
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 70

Expert Comment

by:Éric Moreau
ID: 38753196
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
ID: 38753202
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 70

Accepted Solution

by:
Éric Moreau earned 250 total points
ID: 38753210
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
ID: 38753225
i will look. I will keep this question open for now. Thanks for your help.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

815 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

8 Experts available now in Live!

Get 1:1 Help Now