Skip to content

No need to restart the shell to update path #117627

@jamiehankins

Description

@jamiehankins

Issue Type: Feature Request

When you install Visual Studio Code, in the last step, it allows you to add it to various menus, and also to add it to the system path. It says that if you add it to the system path, the shell will have to be restarted for it to take effect.

This is not the case. Instead, you only need to send a WM_SETTINGCHANGE message to all windows using HWND_BROADCAST. When the shell receives that message, it reloads the environment.

Here's my StackOverflow entry for that:
https://stackoverflow.com/questions/13222724/command-line-to-remove-an-environment-variable-from-the-os-level-configuration/48816308#48816308

VS Code version: Code 1.53.2 (622cb03, 2021-02-11T11:48:04.245Z)
OS version: Windows_NT x64 10.0.19042

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions