Updating Environment Variable %PATH%
10/24/2018 465 views
I'm facing a dilemma I can't quite seem to find a solution for. In our system environment variables I need to add the path \\server03\folder without overwriting what is already stored in PATH.
I've tested the setx command and it works fine but a lot of our machines have more than 1024 characters in the PATH variable and setx truncates at 1024. This, obviously, is problematic.
I'm creating a batch file to install an application client from the \\server03\folder location and would like something simple to add to the PATH variable. The simplest solution I can think of would be to create a registry key that contains every possible entry people could have in PATH and import that but I know I won't catch everything and some app will break because of it.