I did this quick bit of PS to check a file version number and then launch a
patching process if it isn't at a certain level. It works OK but I am sure
there is a much cleaner and more elegant way to do this. Any pointers?

Here's the script














*$1 = (Get-Command "C:\Program Files\AppSense\Environment
Manager\Agent\EMCoreService.exe").FileVersionInfo.FileVersion$2 =
$1.replace(".","")IF ($2 -lt 844950){ Start-Process -FilePath
"$env:systemroot\system32\msiexec.exe" -ArgumentList "/p
\\DC\FileStore\AppSense\EnvironmentManagerAgent64.msp /qn" -Wait}ELSE{ exit
0}*
I'm sure I could do this much better....please aid my development.... :-)

Cheers,


-- 
*James Rankin*
---------------------
RCL - Senior Technical Consultant (ACA, CCA, MCTS) | The Virtualization
Practice Analyst - Desktop Virtualization
http://appsensebigot.blogspot.co.uk

Reply via email to