Installing software in Windows OS without admin rights and dealing with PATH environment variable

285 views Asked by At

My question here consists of several problems. It will be appreciated if you can provide an answer to either of them.

I work in an institution that has limited system users by restricting any installation, uninstallation, and any sort of modification on the system including changing the system environment variables. You can find the level of frustration as a programmer being forced to submit tickets to the IT department to update your VS code!

In the Linux OS users can easily install most of the required software by their user-level privileges and define user path variables as well. I searched for such capability in Windows OS.

To this point, I came across two solutions: 1- The following code will elevate the user privileges to the highest possible and try to install the program. It works for some software. You make a text file, write the code in it, change the file extension to .bat, and then run the file.

set __COMPAT_LAYER=RunAsHighest
start VSCodeUserSetup-x64-1.85.1.exe

I used VSCodeUserSetup-x64-1.85.1.exe as an example, you can change it as you wish with your installation file name.

2- Some well-written programs provide user installation executable. It is the most convenient but it raises another problem on its own. The user PATH does not let us change the system PATH, which is a sharp contrast to other environment variables. (Sources; Source) Methods of changing the PATH variable that I have used can be found here, and here.

setx PATH "%PATH%;C:\NewPath"

I have found that some installation programs such as VS Code can change system PATH variables without having admin privileges. How can they do that?

Any help or suggestions on either of these issues would be greatly appreciated. Thank you!

0

There are 0 answers