Even after reading all the posts, I'm still not sure what the objective is. I think that you want to first test to see if Acrobat is installed. If not then install. Then or else open it.
Checking for the existence of the file is not good practice. Also the installation can be repackaged as silent.
Here is a beta script I've got on the back burner that checks the registry to see what version of Acrobat is installed and to uninstall all but the latest version. As a beta, the action lines are commented out.
code:
break on
;Search for "Acrobat Uninstall"
$Index = 0
:Loop1
$KeyName = ENUMKEY("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\", $Index)
If @ERROR = 0
If InStr("$KeyName","Acrobat")
"Name found: $KeyName" ?
Select
Case $KeyName = "Adobe Acrobat Reader 3.0"
"Uninstall Acrobat 3.0" ?
$UninstallStr = READVALUE("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Adobe Acrobat Reader 3.0","UninstallString")
;SHELL $UninstallStr + " -A"
"Complete." ?
Case $KeyName = "Adobe Acrobat Reader 3.01"
"Uninstall Acrobat 3.01" ?
$UninstallStr = READVALUE("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Adobe Acrobat Reader 3.01","UninstallString")
;SHELL $UninstallStr + " -A"
"Complete." ?
Case $KeyName = "Adobe Acrobat 4.0"
"Uninstall Acrobat 4.0" ?
$UninstallStr = READVALUE("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Adobe Acrobat 4.0","UninstallString")
;SHELL $UninstallStr + " -A"
"Complete." ?
Case $KeyName = "Adobe Acrobat 5.0"
"Leave alone" ?
Goto Done
Case 1
"OH OH, Not sure what to do!" ?
EndSelect
EndIf
$Index = $Index + 1
goto Loop1
EndIf
"Install Acrobat 5.05" ?
;shell 'path\setup.exe /s'
:Done
get $_
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.