I need to use a cmd.exe command line (cmd.exe is being called from the gyp build tool) to determine whether an environment variable is defined or not. How can I do this? I
@echo off
setlocal disableextensions
set x=%path%
if "%x%"=="" (echo "PATH" does not exist) else (echo "PATH" exists)
set x=%pathx%
if "%x%"=="" (echo "PATHX" does not exist) else (echo "PATHX" exists)
endlocal