Jump to content

Adobe Acrobat 8.1.2 Installation


SitX
 Share

Recommended Posts

Hey,

i'm trying to write a small AutoIt-Script für the "Adobe Acrobat 8.1.2 DE" application. The Script have to do following:

1. Check if the process "msiexec.exe" is running, if yes -> KILL

2. Check if Acrobat is installed ("If $ReaderVersion = "8.1.2" Then" is just an sample!), if yes -> uninstall

3. If Acrobat is not installed -> install it

The Problem is, when acrobat is installed and mine script try to uninstall it, i became not the uninstall dialog... :)

what is wrong?

Dim $UninstallInfo = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\8.0\Installer", "DEU_GUID")
Dim $ReaderVersion = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & $UninstallInfo, "DisplayVersion")
Dim $ReaderPath = Regread("HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\8.0\Installer",  "Path")
Dim $ReaderUninstall = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & $UninstallInfo, "UninstallString")


If ProcessExists("msiexec.exe") Then
    run(@ComSpec & " /c " & 'taskkill /F /IM msiexec*')
EndIf

If stringlen($ReaderPath) > 0 Then
    If $ReaderVersion = "8.1.2" Then
        Run($ReaderUninstall, "")
        Winwait("Adobe Reader 8.1.2 - Assistent", "Willkommen bei der Installation von Adobe Reader 8.1.2")
        ControlClick("Adobe Reader 8.1.2 - Assistent", "Willkommen bei der Installation von Adobe Reader 8.1.2", "Button3")
        Winwait("Adobe Reader 8.1.2 - Assistent", "Programmverwaltung")
        ControlClick("Adobe Reader 8.1.2 - Assistent", "Programmverwaltung", "Button3")
        ControlClick("Adobe Reader 8.1.2 - Assistent", "Programmverwaltung", "Button5")
        Winwait("Adobe Reader 8.1.2 - Assistent", "Programm entfernen")
        ControlClick("Adobe Reader 8.1.2 - Assistent", "Programm entfernen", "Button1")
        Winwait("Adobe Reader 8.1.2 - Assistent", "Installation abgeschlossen")
        ControlClick("Adobe Reader 8.1.2 - Assistent", "Installation abgeschlossen", "Button1")
        
        If ProcessExists("msiexec.exe") Then
            run(@ComSpec & " /c " & 'taskkill /F /IM msiexec*')
        EndIf
        Exit
    EndIf
Else
    MsgBox(64, "Adobe Installation", "Starte Installation")
    Run("AdbeRdr812_de_DE.exe")
    WinWait("Adobe Reader 8.1.2 - Assistent", "Adobe Reader 8.1.2 installieren in")
    ControlClick("Adobe Reader 8.1.2 - Assistent", "Adobe Reader 8.1.2 installieren in", "Button1")
    WinWait("Adobe Reader 8.1.2 - Assistent", "Bereit das Programm zu installieren")
    ControlClick("Adobe Reader 8.1.2 - Assistent", "Bereit das Programm zu installieren", "Button1")
    WinWait("Adobe Reader 8.1.2 - Assistent", "Installation abgeschlossen")
    ControlClick("Adobe Reader 8.1.2 - Assistent", "Installation abgeschlossen", "Button1")
    
    If ProcessExists("msiexec.exe") Then
        run(@ComSpec & " /c " & 'taskkill /F /IM msiexec*')
    EndIf
    Exit
EndIf
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...