What type of application should I create in c#.net that just executes codes when run from a command line.

The application will not have an interface but just simply executes the methods.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


There are other pages that have some samples.

Here is one:

you can run this on the on_load for your project... The autoexec.bat file can have any command... example to map a drive is this:

NET USE U: \\master\testshare /User:Enterprise\dchoksi passwd /PERSISTENT:YES

It mapps a drive

System.Diagnostics.Process proc = new System.Diagnostics.Process();
MessageBox.Show("Map Drive Created");

Good luck!!!!!!!!!!!!1
Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics TeacherCommented:
You can use a "Console Application" if you need to output back to the console, or a "Windows Forms Application" with the form deleted and code in main() if you want a silent app that doesn't create a console when it is run.

You could also use a "Windows Service" if the app needs to be run all the time in the background.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Najam UddinCommented:
if it has to execute those method at predefined events or time/interval make window service, if want to expose those to other component make it web service
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.