need to read an XML file and make an IF decision
in a deployment package, trying to figure out a way to check the contents of a specific .xml file on the hard drive of the target PC and IF a certain string matches then abort the install ELSE proceed to delete/re-install the application, something like this batch file, but not sure best way to read xml into memory to parse it and make a decision on it:
IF EXIST "c:\dassaultsystemes\C214"
somehow read "c:\dassaultsystemes\C214\sftmgt\install.xml" file into memory
IF install string matches "V6R2103xE.HF9"
write-output "C214 already installed successfully, exiting"
ren "c:\dassaultsystemes\C214" "c:\dassaultsystemes\C214_OLD"
timeout /t 10 /nobreak
write-output "bad C214 install removed, proceeding with new install"
write-output "proceeding with initial install"