4

I want to create a windows cmd with a empty environment, meaning no env variables. What would be the easiest way to get rid of them?

Peter Kirschner
  • 927
  • 1
  • 9
  • 17

1 Answers1

3

Run set to list them all, split by the = sign, set them all to empty.

for /f "usebackq delims==" %f in (`set`) do (set %f=)
TessellatingHeckler
  • 27,511
  • 4
  • 48
  • 87