Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming the executable #41

Open
asunar opened this issue Dec 28, 2017 · 3 comments
Open

Renaming the executable #41

asunar opened this issue Dec 28, 2017 · 3 comments

Comments

@asunar
Copy link

asunar commented Dec 28, 2017

I would like to start portable VS Code from the command line. For example I would like to start it with

code .

Renaming the exe to code caused an exception. Any ideas?

@nidunc
Copy link
Contributor

nidunc commented Jan 15, 2018

Renaming the exe to code caused an exception. Any ideas?

Do you mean that you tried to rename Code.exe to just Code? I can see why that didn't work, Visual Studio Code probably depends on the main executable being called Code.exe.

There is one, albeit non-portable, way to achieve what you want (if I understood you correctly) - provided you have administrator access to the computer you're running VSCode on.

  1. Go to the system environment variables
  2. Add the directory which contains Code.exe to the PATH variable (see linked article for instructions)
  3. Now you can type code in any command prompt (on the same computer) to start Visual Studio Code

Of course you should rename code back to Code.exe before actually trying to start VSCode this way.


Disclaimer: I'm not the maintainer of this repository, but a mere contributor.

@asunar
Copy link
Author

asunar commented Jan 15, 2018

Does it work for you when change the name of the exe to code.exe? Yes, I meant I tried to rename it to code.exe.

@nidunc
Copy link
Contributor

nidunc commented Jan 15, 2018

Do you mean you tried to rename the executable from Code.exe (with a capital C) to code.exe (all lower case letters)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants