-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
VSCode installer "open with..." fails on unprivileged accounts #33785
Comments
Your Solution works perfectly when VS Code is installed on the default location. I'm using the 64-bit version. Thank you @lethevimlet ! |
The hex values are the path to the default location just change them if you need a different location, I'm glad it helps someone ^_^ |
I think the installer does use HKEY_CURRENT_USER\Software\Classes, because according to MSDN:
If it writes to ROOT, the default settings should apply to non-admin too, which is not the case. |
From looking at |
As this is still unresolved, I updated the question in order to change the hex values to strings so it can be easily used by people using a non default install path, didn't test it though but it should work, let me know if I doesn't. |
Based on this discussion, I was able to create file and folder context menu association with VScode portable: :: File Name - RegisterVSCodePortable.bat
:: File Location - D:\Software\Editor\VSCodePortable.1.29.1 (roaming directory)
SET CodeExePath=D:\Software\Editor\VSCodePortable.1.29.1\Code.exe
REG ADD HKCU\Software\Classes\*\shell\VSCode\command /t REG_EXPAND_SZ /d "\"%CodeExePath%\" \"%%1\""
REG ADD HKCU\Software\Classes\Directory\Background\shell\VSCode\command /t REG_EXPAND_SZ /d "\"%CodeExePath%\" \"%%V\""
REG ADD HKCU\Software\Classes\Folder\shell\VSCode\command /t REG_EXPAND_SZ /d "\"%CodeExePath%\" \"%%V\"" (could also be a workaround for #57198) |
this worked for me, Awesome!! Thanks a lot @lethevimlet |
VSCode Windows installer fails to add context menu on standard user accounts since it uses HKEY_ROOT
Installer reg values should use HKEY_CURRENT_USER\Software\Classes instead of HKEY_ROOT, this will fix the issue and work for all kind of users.
This fixes issue #12147 which was closed prematurely.
As a meanwhile solution:
Add this to a text file and rename it to .reg, then double click on it and enjoy open with VSCode.
(Note: this will only work on default install location, you must edit paths if another install location is used)
The text was updated successfully, but these errors were encountered: