Hey all I have a simple problem I was hoping someone can give me assistance with. I'm trying to get WMIC to return output however on different machines, the executable is in different directories. Is there a method to check all directories I list to get it to run, e.g.:
IF EXIST
wmic=c:\checkhere\
ELSE
wmic=c:\checkthisone\
CONTINUE
wmicresides not in its default location and/or its path is not present in thePATHenvironment variable?wmicis in the PATH. It's also considered a good idea to leave the system PATH as it is (there are exceptions but most of he time they don't apply).