Reputation: 17
I have created a C# console application with Visual studio 2010. I would like to achieve running my program without human interact and even without the opening of the visual studio. Manually to do so will be navigating to pathName\programName\programName\bin\Debug\ and double click the application file programName.exe
But how can i do this automated? with no opening of VS?
Thanks, Lain
Upvotes: 0
Views: 3570
Reputation: 6524
If your file name is C:\run.exe, you can run it from the batch file as follow:
Create a batch file myfile.bat Paste this inside your batch file "C:\run.exe" Save
Now running this batch file will run your exe.
To automate this, add a task into Windows Scheduler. You can specify how often you want to automatically run the batch file or exe.
BTW, To run this exe one time without opening VS, simply type C:\run.exe at the command prompt.
More information on windows scheduler is here
Upvotes: 0
Reputation: 3493
Open notepad, put in 1 line:
pathName\programName\programName\bin\Debug\programName.exe
Save as Runner.bat
Run "Runner.bat" however you like.
However unless you're specifying any extra parameters, or anything else that affects execution of the program this is completely redundant.
Upvotes: 3
Reputation: 65534
@echo off
title LainsAutoRun
ECHO "Running Application"
"YourApp.exe"
:end
Upvotes: 0