Click here to Skip to main content
15,891,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have written a console app. I want to know if there is a way that I can somehow "register" it so that I can call it from anywhere, kind of like git.

So, I can open a console window and just go:

myApp -myParams

Thanks in advance,
Dom
Posted

You may put your exectuable in one of the folders included in the Windows executable search path[^], or you may modify the latter to include your application's folder.
 
Share this answer
 
Although this has nothing to do with programming, I think you can simple add the path of your console application to the PATH system variable:

Windows 7

Select Computer from the Start menu
Choose System Properties from the context menu
Click Advanced system settings > Advanced tab
Click on Environment Variables, under System Variables, find PATH, and click on it.
In the Edit windows, modify PATH by adding the location of your application to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
Reopen Command prompt window, and run your app.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900