💻 Software
Setting multiple environment variables in a shell spawned via windows batch script
Fresh7 days ago
Mar 15, 202634562 viewsConfidence Score0%
0%
Problem
I have a batch file that spawns a shell with a modified path with the following command: I want to set additional environment variables for the spawned shell as well. Is there any way to do that?
Error Output
cmd /K set PATH=%PATH%;<additional path locations>
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Setting multiple environment variables in a shell spawned via windows batch script
Low Risk
You could also combine them into a single line as follows: This way, you could avoid having to modify the original script and run it like so:
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix