Can't appear environment variables editor when edit Path (System environment variable) on Windows 11 - operating-system

I freshly install C/C++ compiler in my new window 11 laptop using MinGW Installer. and when i try add bin folder path to System environment path variable (System Environment Variable > Path) there i can't see Environment Variables Editor instead I found System Variable Editor but my old windows 10 laptop show Environment Variables Editor.
I can't understand what happened. And I don't know how to edit system environment variables using System Variable Editor.
Windows 10 laptop show Edit Environment Variables:
Windows 11 laptop doesn't show Edit Environment Variables but here show System Variable Editor:
I am the new on this platform so please forgive me if I have made any mistakes.
Thank you.

In fact an environment variable is an entire string. Windows 10 just displays multiple values separated by semicolons in a user friendly way. If you want to add a new value, append the value you want at the end of the entire string, and make sure there is a semicolon between the value and the previous one.

Related

On VSCode for Windows, how do I set my java home user setting to be the value of an environment variable?

With VSCode on Windows 10, how do I set my java home user setting to be the value, JAVA_HOME, that is defined in my environment? I've opened my user settings.json file and added
"java.jdt.ls.java.home": "${env:JAVA_HOME}"
I have confirmed in my command prompt and PowerShell that the environment variable is defined. But when I re-load VSCode, I get this error
What's the correct way to point VSCode to my existing JAVA_HOME env var?

How to change environment variables for a specific vscode folder(workspace)

I have more than a couple of compiler that I use. I'm looking for a way to modify the path variables just for a folder(a project where vscode is used). This path should not disturb the user path variables.
host machine : Windows
Thanks,
Manish

How to automatically set environment variable for eclipse terminal view?

I use the terminal view in eclipse:
Every time I start the terminal I run a command to set an environment variable, e.g.
SET HTTPS_PROXY=***.**.***.***:****
I need this as a prerequisite to be able to download some python packages with the python package manager, e.g
pip install mesa
=> Is there a way to automatically run a "startup command" when the Eclipse terminal is opened?
I expected that there would be some Eclipse setting to configure the environment variables for the terminal or to specify some initialization script. However, I could not find such a setting.
I tried to set the proxy settings in eclipse.ini
-Dhttp.proxyHost=***.**.***.***
-Dhttp.proxyPort=****
-Dhttp.nonProxyHosts=localhost|127.0.0.1
However, that does not seem to influence the proxy for the terminal view.
(I actually use a portable version of eclipse with EclipseProtable and in EclipsePortable.ini I am already able to specify some extra paths that will be known when I open a terminal view, e.g.
AdditionalPaths=./App/WinPython/python-3.7.2.amd64;
Also see https://portableapps.com/node/32861 for informatino about EclipsePortable
However, I was not able to set envirionment variables in the ini file EclipsePortable.ini.
)
You can use your system environment variable.
In Windows search the "User Account" parameter.
It must show your current account, search for "Environment variable".
Now you can set all the variables you need and they will be used by default in any terminal in Eclipse (restart Eclipse if it was running).

Visual Studio Code Powershell extension does not recognize profile while debugging

I’m using the Powershell extension for Visual Studio Code. I updated the profile:
C:\Users\xxxxxxxx\Documents\WindowsPowerShell\Microsoft.VSCode_profile.ps1
To include some functions and variables that I want to make available to other scripts. When I reference a variable from the profile within another script, it does not appear that the profile has been loaded. I suspect this because the variable value is blank when I query it from the VS Code console. If I run the same test from the standard Powershell console with an associated profile, the variable value is resolved.
Can anyone tell me what, if anything, I need to do to use a Powershell profile in VS Code while debugging?
There are several profiles. The starting point is the four locations that you can find by reading the following properties of PowerShell's built-in $profile variable.
$profile.CurrentUserAllHosts
$profile.CurrentUserCurrentHost
$profile.AllUsersCurrentHost
$profile.AllUsersAllHosts
As noted in this article by The Scripting Guy, because Windows has both Powershell and the Powershell ISE, you have at least two possible values of Current Host, so at least 6 profiles.
I've tested this in the Visual Studio Code terminal window, and it seems that the "CurrentHost" profiles are the same as you get by simply running a powershell instance. I'd assume then that Code isn't seen as a distinct host, and just runs a normal powershell.
Once you've got that far, there's another possible complication, which is that the AllUsers profiles are down in C:\Windows\System32 and hence on a 64 bit system, also mirrored in C:\Windows\SysWOW64\. So depending on whether you are using a 32 or 64 bit editor, and whether the Powershell is hosted in a 32 or 64 bit process, it is quite possible that the file you are editing has no influence on the Powershell.
Inside your debug session run: $profile. This will return the path to currently used profile file, so you can make your changes there.
Alternatively you could change the system wide profile in C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1
With the just released version 0.10.0 of the VS Code PowerShell extension debugging with a previously loaded profile.ps1 being available is now implemented. Note that the interactive console and the debugger share the same PS session.
If you type $profile in the "PowerShell Integrated Console" of VSCode, you will see the path to the profile used:
C:\Users\xxx\Documents\WindowsPowerShell\Microsoft.VSCode_profile.ps1
Now if you type $profile in a normal terminal, you will see your "normal" profile: C:\Users\xxx\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Now the easiest solution that did the trick for me is to create a hard link between the two files (the VSCode_profile.ps1 file didn't exist in my case):
mklink /H Microsoft.VSCode_profile.ps1 Microsoft.PowerShell_profile.ps1
Reload VSCode and you are all set!

Environment Variables keep changing

I am working in Win 7. So I have set the Path variable inside properties, environment variables. But when I e.g. type java in command line it doesn't recognize it up until I write set Path=... And set the exact same thing I have already manually set in the properties env variable window. And then it works. But again when I close the command line and re-open it, it doesn't recognize javac. So every time I open the command line I have to set the Path. Any idea?
In Windows using set from the command line only sets the environment variable for that process. When you are doing it from the command line and then closing it, you are losing what you did there.
You say Properties, Environment Variables, but let me run through the steps so that we're on the same page.
To make sure an environment variable "sticks" click the Start button, Right Click "Computer" and choose Properties. Click Advanced System Settings and then Environment Variables... In the dialog that comes up, under the System Variables section double click on the Path environment variable. Scroll to the end, add a semi-colon, and then add the path to your executable.
You will now have to restart any process that was already running.