|
how about this new code........... ;Gosub ChkInstaller ;Gosub MSIparam
If Not Exist ("C:\Program Files\Adobe 8.0") MessageBox("Installing Adobe Reader 8.0","ESI International",,2) Shell '%systemroot%\system32\msiexec.exe /qb!- /i"\\william\admin\users\adobereader\8\AdobeReader 8.0.msi"' WriteValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\8.0\AdobeViewer\", "EULA", "1", "REG_DWord")
;--------------------------------------------------------------------------------------------------------------
:UNINSTAR6 ; Purpose: To uninstall AdobeReader 6.x Dim $uninst,$leftpart,$rightpart ; Read Registry key to determine in AR 6 is installed $uninst=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Adobe Acrobat 6.0","UninstallString") If $uninst<>"" If Exist ("C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe") ;Acrobat 6 detected, uninstall. Parse string, add '-y' For quiet mode $leftpart=Left($uninst,InStr($uninst,"-f")-2) $rightpart=Right($uninst,Len($uninst)-InStr($uninst,"-f")+1) $uninst=$leftpart+" -y -a -x "+$rightpart Shell $uninst
;==============================================================================
:UNINSTAR7 ; Purpose: To uninstall AdobeReader 7.x Dim $uninst,$leftpart,$rightpart ; Read Registry key to determine in AR 7 is installed $uninst=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Adobe Acrobat 7.0","UninstallString") If $uninst<>"" If Exist ("C:\Program Files\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe") Exit ; Acrobat 7 detected, uninstall. Parse string, add '-y' for quiet mode $leftpart=Left($uninst,InStr($uninst,"-f")-2) $rightpart=Right($uninst,Len($uninst)-InStr($uninst,"-f")+1) $uninst=$leftpart+" -y -a -x "+$rightpart Shell $uninst
EndIf
|