Originally Posted By: Mart
Not tested but this rewtite of the code might work.
No ugly GoSub's and stuff.

Code:
Break on

$key = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"

$ar6 = ReadValue($key + "Adobe Acrobat 6.0","UninstallString")
$ar7 = ReadValue($key + "Adobe Acrobat 7.0","UninstallString")
$ar8 = Exist("C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe")
;
If $ar6 <> ""
	;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
EndIf
If $ar7 <> ""
	; 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
If $ar8 <> "1"
	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 ("HKLM\SOFTWARE\Adobe\Acrobat Reader\8.0\AdobeViewer\", "EULA", "1", "REG_DWord")
EndIf


Hi

Im looking for some code like above.
For me the code works only for installing 8.0 he doesnt install a version of 7.

does anybody see the problem ?
_________________________
A mistake is Human, But to make it a real mess you need a computer.