How to change default installation path for vs code? - visual-studio-code

After changing my windows user folder (C:/Users/{this}), i can't use "open with code". I've tried to reinstall app, but its asks for an old windows user folder to install the app. I've installed vscode with .zip but "open with code" feature still can't find the app, and keeps asking for my old path to vscode (C:/Users/{oldUserName}). So the Question is more about: how to configurate or delete this "open with code" feature?

I've solved this by replacing all old paths in regedit with the new one, you can find all with Crtl + F and search for your old user name foder

Related

How to change folder that opened by default in VSCode?

I have small problem with VSCode folder, that opened by default.
Problem description: I start new instance of VSCode (trough File->New Window), and then if I choose File->Open Folder it opens dialog with my Windows user folder as starting point (C:\Users\MyUser)
Question: How can I change that folder in settings (if it possible)? So by default it will show as start point for example D:\development\ ?
At the time I write this answer, this is not possible. There are two problems on Windows, and one problem on Mac and Linux:
VS Code does not provide a default path to the file dialog 1. It does remember the last folder that you opened a file in, but that path cannot be used as a default because it is overwritten constantly.
On Windows only, Electron ignores the default path when creating a file dialog if the default path is a directory 2.
An extension also cannot solve this, because extensions are not allowed to modify the File menu 3.
I think the best option at this point is to pin a folder to the Quick Access area in Windows Explorer, as suggested in a comment, or to put an actual shortcut in the user profile folder.
Workspaces and File > Open Recent may also be helpful if you often open the same folders.
Your main problem is that you are unable to open your specific folder in VScode.
To solve that you can simply open the terminal/cmd in that specific window by just typing cmd in your search bar or just by pressing shift+right-click in that folder.
Now your cmd is open and you just have to type "code ." in the cmd and press enter to open the current folder in your VSCode.
In case that code . doesn't work for you then you have to add the Vscode in the environment variables of your windows.
Visual Studio doesn't provide a specific feature to open a specific path. But there is a solution to your problem. You are saying that you want D:\develpment as a default when you open VS Code. You can go to that specific directory or create shortcut to desktop then click right click on that folder and then click on open with code. If you didnot see open with code then reinstall your VS code and check on open with code when you are reinstalling VS Code.
make a shortcut on the desktop for vscode and then modify it and add the folder after the .exe command. This will default open that folder when you double click on it.
Visual Studio Code can be installed in two ways - User setup and System setup. I strongly believe you have User setup installed in your PC. Try re-installing it System-wide. That should probably fix your problem.
For more information: https://code.visualstudio.com/docs/setup/windows#_user-setup-versus-system-setup
PS: A lot more information is needed, you can share a screenshot of the window and elaborate more on it.

How do I factory reset Visual Studio Code or Delete Folders

I started to learn one language and moved to a different one. I want to start with that language with a fresh code editor. But I don't know how to reset visual studio code and delete all my data. Can someone help me? I'm quite new to vs code. (Sorry if this is a stupid question)
You can delete VSCode related data comletely by deleting both of these or if you just want to reset your editor just delete the .vscode folder in your user profile.
To Delete user data directory Code:
Windows %APPDATA%\Code
macOS $HOME/Library/Application Support/Code
Linux $HOME/.config/Code
To Delete the extensions and other related data, delete the folder named .vscode:
Windows %USERPROFILE%\.vscode
macOS ~/.vscode/
Linux ~/.vscode/
Press CTRL + SHIFT + P
Type "settings json"
Click "Preferences: Open Settings (JSON)"
Edit file and leave only braces { }

How to undo "Don't show this prompt again" in vscode python?

Accidentally selected "Don't show this prompt again" when prompted to install Pylint in VSCode Python. How should I undo/reset the action so the prompt will appear again?
See the issue notes here: https://github.com/Microsoft/vscode/issues/24815
You might have to do this:
deinstall Visual Studio Code
delete C:\Users[Username].vscode
delete C:\Users[Username]\AppData\Roaming\Code
or relevant paths on your operating system.
To anyone coming here from Google, if you're looking to reset the "Are you sure you want to move 'file' into 'folder'?" prompt:
On macOS, open /Users/[username]/Library/Application Support/Code/User/settings.json and remove "explorer.confirmDragAndDrop": false.
It's a similar process on Windows and Linux ✌️
Here is how to do it on macOS without uninstalling VS Code or delete globalStorage:
Quit all VS Code instances (Cmd +Q)
Instal SQL Lite browser https://sqlitebrowser.org
Go to: /Users/[user_name]/Library/Application Support/Code/User/workspaceStorage/ => Find the one that associate with your workspace that you previously clicked "Don't show this promt again" (by looking into workspace.json and identify the name)
Open stage.vscdb file with SQL Lite
Look for data key "ms-vscode.csharp"
Edit "assetPromptDisabled":true to "assetPromptDisabled":false
Save change
Reopen vs code
https://github.com/microsoft/vscode/issues/24815#issuecomment-547733206

Can't find Visual Studio Code on windows 8.1 not in start screen

Just installed Visual Studio Code, and noticed I can't find it by searching in the start screen.
The default installation location is in %APPDATA%, which by default isn't indexed by Windows.
What's the solution to this?
I've read that adding %APPDATA% to the indexing can slow it down considerably because of the sheer number of files there.
I experienced the same thing on Windows 10, and this is what I learned:
I found that it's in: C:\Users\ USERNAME \Appdata\Local\Code\ APPVERSION \code.exe
where USERNAME is the username on the computer, and APPVERSION is the version of code installed (example, my folder is app-0.5.0 so it would be in C:\users\user1\appdata\local\code\app-0.5.0\code.exe
I right-clicked on Code.exe and chose "Pin to Start" and now I can launch VS Code from start menu.
What's even stranger (to me), is Code installed into the user directory of the user account that I'm not logged into at the moment. I have user1 and user2. I'm logged in as User1. Code installed in User2's Appdata directory!
I had a similar problem, so I right clicked on a html file and selected open with vs code. Once the application was open, I pinned it to the taskbar. And now I can access it anytime.

Install VSCode in a specific folder

I just downloaded the Visual Studio Code App from https://code.visualstudio.com/ and when I tried to install it, it simply just installed it by itself, without the option to change the installation path.
I have an external harddrive, which is where I want the IDE to be placed instead of the Local Harddrive. How can I change this?
On the VSCode download page select "System Installer" instead of "User Installer". The System installer will prompt you for the install location.
Full credit to Hans Passant for giving the following working solution as a comment.
The installer does very little beyond copying the files, it just creates some Explorer context menu shortcuts ("Open with Code"). Otherwise following Chromium conventions and copying itself to c:\Users\yourname\AppData\Local\Code\app-0.1.0 so it can update itself without you noticing. Boo. So high odds that simply moving that folder to the other drive works just fine, put it anywhere and create a shortcut to Code.exe. If you still want the context menu entry to work then use Regedit and search for "code\app-0.1.0".