-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Allow user-level installations #534
Comments
The Open with Code action is gone by default since |
Thanks for your reply. Assign vscode with specified file extensions like .md works ok. But i can't set the association for folders to open a complete folder in vscode from within the explorer. And unfortunately my working user account, which should use the actions, does not have adequate rights to install any programm on my computer (AD policy). So i can't select the options in setup for my working user. Do you have any suggestion how i can add the context menu item manually? In regedit.exe? tia, |
Here's what we do in the installer, hope it's not too cryptic.
I will actually reopen this and rename it according to the real issue. |
Thanks. That helped. 👍 |
+1. I don't have Administrator access on my machine and I don't understand why I would need it in order to install a text editor. Please support the ability to install Code without requiring elevated permissions. I'm not sure if this request matches the original description of this issue, but it matches the current title... |
@joaomoreno you changed the title of the issue which now matches exactly my (and @jchadwick) request, but missmatches the authors request. Disappearing context menus because of different user-level installations are not related to "allow installations in different user-levels" or: I want to install VS Code without admin privilegs. |
They do not disappear. They are configured in the registry under There always the possibility of adding some commands to Code that would install and uninstall these shortcuts for your user, as commands in the command palette.. That might actually be a good idea. What do you think? |
I'd be all for a command being added to configure this for the current user. Though I have to wonder why you don't just provide an option for installing the context menu to all users and then sticking the registry settings in the HKLM hive. Running a system as a non-admin should be what we are all doing these days right? I converted the registry keys posted by @joaomoreno above into a PowerShell script. Only the script will install the keys at HKLM so it will work for all users on the system. If you only want the context menu for the current user then just change the
|
Hi, for me both variants are ok. I think, that's a good way. Greetings, |
Looks like there's a workaround: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run-from-source Quite an ugly one, of course. |
@mihailik open source builds lack some of the features of the official builds (extensions, auto updating). |
@Tyriar and as I've found out, you can't build behind the proxy -- electron-retrieving scripts don't honour npm nor git proxy settings. |
Hi, |
I can confirm that the installer is still not writing the relevant keys at HKLM. |
Hope this can be fixed soon. No one in our organization run under admin account as default, so it is not possible for us to install vs-code with these "Open in code" shell extensions. To install it we right click and select "run as administrator", but then it adds it only to the administrator account, which we don't use. |
Anyone tracking this issue? What's the rank on roadmap? Admin access in corporative desktops is almost extinct theses days. If the barrier is only about HLKM vs HKLU keys, please just ask it during installation wizard: All users / User-only. It's boring having to update manually. |
My office just removed everybody's admin rights for improved security they say. So now I can't update VS Code without bothering support. This adds significant friction to my use of VS Code. |
Would http://www.jrsoftware.org/ishelp/index.php?topic=setup_privilegesrequired |
Without this, vscode is really difficult to use in a locked-down environment. I think this is critical |
Not having the "Open with Code" in the context menu of files/folders for explorer and the "code" command in powershell/console is awful! My company gave me a domain account that I use for development...I can install software on my machine with the local machine admin account. The Vscode install installs the contextmenus/etc under the local machine admin account only. No matter how you try. Open as admin/blahblah I need a clean way of installing the reg keys. And I didn't find anything on the net that i can trust. Make it a post install command or something Otherwise I'm drawn to Sublime Text |
@tdgleason If all you are trying to do is get the registry keys set, this issue itself has those registry keys listed. @joaomoreno, a member of the Microsoft org (i.e. someone you can trust in this context), listed the register keys needed at the top of this issue. I later took that and created some powershell commands to do that for you and posted them above. I've been using that for every install I use and haven't had an issue. It would be nice to get this feature added instead of having to run those commands each time, but since that happens fairly infrequently anyways I just added it to my workstation build process. |
@The-New-Guy I tried applying your commands to my installation at work (stuck on Windows 7) and they didn't work out of the box for HKCU (cannot confirm HKLM). I had to change some capitalization before it worked as well as adding some keys (not the values) manually using regedit. After that, it worked like a charm, though. Changed them to: ## Configure Open with VSCode Context Menu ##
# Get CPU architecture and configure VSCode location
$isOSx64 = (Get-WmiObject -Class Win32_ComputerSystem).SystemType -match '(x64)'
$vscodeLoc = 'ENTER PATH HERE'
$regHive = 'HKCU:' # Change this to 'HKLM:' if you only want this for all users.
# Configure Open with VSCode for files
New-Item -Path "$regHive\Software\Classes\*\shell\VSCode"
Set-ItemProperty -LiteralPath "$regHive\Software\Classes\*\shell\VSCode" -Name '(Default)' -Type ExpandString -Value 'Open with VSCode'
Set-ItemProperty -LiteralPath "$regHive\Software\Classes\*\shell\VSCode" -Name 'Icon' -Type ExpandString -Value "$vscodeLoc"
New-Item -Path "$regHive\Software\Classes\*\shell\VSCode\command"
Set-ItemProperty -LiteralPath "$regHive\Software\Classes\*\shell\VSCode\command" -Name '(Default)' -Type ExpandString -Value "`"$vscodeLoc`" `"%1`""
# Configure Open with VSCode for Directories
New-Item -Path "$regHive\Software\Classes\Directory\shell\VSCode"
Set-ItemProperty -LiteralPath "$regHive\Software\Classes\Directory\shell\VSCode" -Name '(Default)' -Type ExpandString -Value 'Open with VSCode'
Set-ItemProperty -LiteralPath "$regHive\Software\Classes\Directory\shell\VSCode" -Name 'Icon' -Type ExpandString -Value "$vscodeLoc"
New-Item -Path "$regHive\Software\Classes\Directory\shell\VSCode\command"
Set-ItemProperty -LiteralPath "$regHive\Software\Classes\Directory\shell\VSCode\command" -Name '(Default)' -Type ExpandString -Value "`"$vscodeLoc`" `"%V`""
# Configure Open with VSCode for Directories while inside the directory (right-click on empty space)
New-Item -Path "$regHive\Software\Classes\Directory\Background\shell\VSCode"
Set-ItemProperty -LiteralPath "$regHive\Software\Classes\Directory\Background\shell\VSCode" -Name '(Default)' -Type ExpandString -Value 'Open with VSCode'
Set-ItemProperty -LiteralPath "$regHive\Software\Classes\Directory\Background\shell\VSCode" -Name 'Icon' -Type ExpandString -Value "$vscodeLoc"
New-Item -Path "$regHive\Software\Classes\Directory\Background\shell\VSCode\command"
Set-ItemProperty -LiteralPath "$regHive\Software\Classes\Directory\Background\shell\VSCode\command" -Name '(Default)' -Type ExpandString -Value "`"$vscodeLoc`" `"%V`"" |
There is a SO question about this blocker issue: https://stackoverflow.com/questions/43467756/vs-code-extension-installation-without-admin-rights According to Abdullah Leghari's response:
|
A link to the vs code zip file: https://code.visualstudio.com/docs/?dv=winzip |
I saw in the milestone that this was deferred, @joaomoreno. Do you need help? Testing or other problems holding you back? |
@TiemenSch Thanks for asking. No real problems now that we've made a decision on what path to follow. We will provide two separate Setup packages. The current one, as well as one which requires no admin privileges. It's just postponed to next month. |
OK! Good to hear that there's discussions/work behind the scenes. You're going to please a lot of people! |
This was merged to |
|
@nejsimon what did you find out, for posterity? I've had the same issue. |
@wahidshafique The release notes says that it's not included in the june release because they want more feedback, so you'd still have to use the insider build. https://code.visualstudio.com/updates/v1_25#_user-setup-for-windows |
When i installed Visual Studio Code as an Administrator and log in with another account afterwards, the "Open with Code" Explorer entries (in the context menu of Files and Folders) are gone.
I searched for it in the Windows Registry and it seems to me, that the Windows Setup only add the entries for the current user. In my example only for the Administrator account of my computer which is another one than that i worked with normally.
It would be nice when the Visual Studio Code setup add the "Open with Code" capability to any user of the system.
Thanks & Greetings,
Andreas
The text was updated successfully, but these errors were encountered: