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?
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?
 
    
     
    
    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#?.