Running a bat file in Windows PE 2.0 [modified] [Solved]
-
I have a bat file with the following FOR loop for parsing the output of a command:
FOR /F "tokens=3 delims=," %%I IN ('command that gets info') DO (
process the results
)This works fine in XP and Vista, but when I run it in a Windows PE 2.0 environment, I get the error
( was unexpected at this time
The command in "command that gets info" has no () in it, so this must be from the ( in the FOR loop syntax. Does Windows PE seriously not support () for block-level command, even though Vista does? [EDIT] After some more testing, it looks like there was some sort of whitespace issue, plus I guess I forgot to install the WMI package - oops :) Anyway, I found a different solution using VBScript that I used here[^]. [/EDIT] Dybs
The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen