1

I have a .Net Console App (written in VB) that I would like to be able to install and have available at the command prompt. When I install it, it shows up in Apps (Windows 8.1), but it isn't available if I launch a command prompt window.

I am using Visual Studio Express 2013 for Desktop. It is a click-once app (because it defaulted to that).

I can copy the executable to the working directory and use it that way. I am using command line parameters.

What do I need to do to have it available at the command prompt after installation?

Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325
adrianwadey
  • 1,719
  • 2
  • 11
  • 17

2 Answers2

0

You have to put the full folder path of the folder where your exe resides in the PATH environment variable. Windows will search there for the name of your exe.

Take a look at this question how to do so using C#, I am sure you can convert this to VB.NET. You can even make this part of the Click Once installation, by providing a post-deployment action or similar solutions.

Community
  • 1
  • 1
Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325
0

The applications you have available in command line are based on the value of the PATH environmental variable.

You can create your own command line shortcut with the PATHs you want (that's the way Visual Studio Command Prompt does this, for example), or you can change the environmental variables globally by doing Win+Break, Advanced system settings and Environmental variables. Add your path to PATH and you're done.

Luaan
  • 62,244
  • 7
  • 97
  • 116