asked on
$SoftwareKey = "HKLM:\Software"
if ((Get-WmiObject Win32_OperatingSystem).OSArchitecture -match "64-bit") { $SoftwareKey = "HKLM:\Software\WOW6432Node" }
if (Test-Path "$SoftwareKey\adobe\Acrobat Reader") {
$adobeversion = get-childitem "$SoftwareKey\adobe\Acrobat Reader"
foreach ($version in $adobeversion) {
Write-Output "Found verstion $($version.PSChildName) of Adobe Reader"
}
if ($version.PSCHILDNAME > 9.4) {
#then uninstall the software
# and install new software via uploaded exe
}
@echo off
setlocal
set CheckVersion=9.4.0
echo Checking Flash against version %CheckVersion% ...
for /f "tokens=3" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\adobe\Acrobat Reader" /v Version 2^>NUL ^| find /i "Version"') do set DisplayVersion=%%a
echo Adobe Reader version: %DisplayVersion%;
if "%DisplayVersion%"=="%CheckVersion%" (
echo ... location has correct version ...
goto :eof
)
echo Please wait while installing the new version ...
start "" /wait "c:\tempdir\adobeinstall.exe" /sAll
echo Done.
VBScript (Visual Basic Scripting Edition) is an interpreted scripting language developed by Microsoft that is modeled on Visual Basic, but with some important differences. VBScript is commonly used for automating administrative and other tasks in Windows operating systems (by means of the Windows Script Host) and for server-side scripting in ASP web applications. It is also used for client-side scripting in Internet Explorer, specifically in intranet web applications.
TRUSTED BY
ASKER