0

When we type "Notepad" in "Windows > Run" the Notepad is launched.

In the same way, I would like to load my WPF window Application when a user types the program name in "Windows > RUN" or in command prompt(cmd).

What should I do to make this happen?

2 Answers 2

1

The reason simply typing notepad works, and you are not required to type the full path of C:\Windows\notepad is because C:\Windows\ is in the PATH environment variable.

Therefore, in order for Windows to be able to find your program when you type myProgram, and not require your users to type C:\Program Files\myProgram\myProgram, the program's location must be in the PATH environment variable.

To do this from code in an install program, see How do I get and set Environment variables in C#?.

Sign up to request clarification or add additional context in comments.

1 Comment

I want to add Environment variables when my application is installing. I am using Visual Studio 2010 Setup.
0

Check this thread:

Run Windows application from Command Prompt

Regards

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.