===== Post Nº 1 =====
Thanks for that. The tab and %# work for me now, but I get an error in my reg query syntax now. I'm essentially trying to perform the following with my query:
reg query %key% /s | find "Version"
I try to pass it the way you wrote:
'Reg query %key% /v DisplayVersion^|Find "REG_" 2^>Nul'
But I'm getting the same error, Type "REG QUERY /?" for usage. I've tried it multiple ways as well since it doesn't seem to understand the pipe too well, I tried
'Reg query %key% /s DisplayVersion^|Find "Version" 2^>Nul'
'Reg query %key% /v DisplayVersion^|Find "Version" 2^>Nul'
'Reg query %key% /s Version^|Find "Version" 2^>Nul'
'Reg query %key% /s Version^|Find "reg_" 2^>Nul'
None of which seem to work.
===== Post Nº 2 =====
OK, I managed to get it working somewhat with:
reg query "%key%" /v Version^|find "REG_"
This is because my registry path has spaces in it. I am still not getting the results intended however, as the executable is not launching. Not sure what I'm doing wrong here but still pounding away at it. What is returned after typing that command is:
Version REG_SZ 18.104.22.168
In fact the full command I'm trying to execute is:
for /f "tokens=3 delims= " %# In ('reg query "%key%" /v Version^|find "REG_" 2^>Nul') do set "rel=%#" if not [%rel%]==[22.214.171.124] start "" /wait "fileservershareflash.msi"
Since I have version 126.96.36.199, the installer should run for me but it's not.
Edited by Yzöwl, 12 June 2008 - 05:31 PM.