Sign in to follow this  
Followers 0
teunvisser

Quicktime

2 posts in this topic

Hey guys,

I've been trying to make this working for about 4 hours now, its driving me crazy.

I've got this script:

#include <guiconstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Install_Manager = GUICreate("Install Manager", 456, 300, 190, 112)
$Button1 = GUICtrlCreateButton("Quicktime", 72, 48, 75, 25)
$Button2 = GUICtrlCreateButton("Silverlight", 152, 48, 73, 25)
$Button3 = GUICtrlCreateButton("Button3", 232, 48, 65, 25)
$Button4 = GUICtrlCreateButton("Button4", 304, 48, 65, 25)
GUISetState(@SW_SHOW, $Install_Manager)

$Quicktime = GUICreate("Quicktime", 456, 300, 190, 112)
$Label1q = GUICtrlCreateLabel("", 200, 30, 156, 17)
$Button1q = GUICtrlCreateButton("Install", 80, 56, 81, 25)
$Button2q = GUICtrlCreateButton("Reinstall", 184, 56, 73, 25)
$Button3q = GUICtrlCreateButton("Deinstall", 280, 56, 65, 25)
GUISetState(@SW_HIDE, $Quicktime)

$Silverlight = GUICreate("Silverlight", 456, 300, 190, 112)
$Label1s = GUICtrlCreateLabel("", 200, 30, 156, 17)
$Button1s = GUICtrlCreateButton("Install", 80, 56, 81, 25)
$Button2s = GUICtrlCreateButton("Reinstall", 184, 56, 73, 25)
$Button3s = GUICtrlCreateButton("Deinstall", 280, 56, 65, 25)
GUISetState(@SW_HIDE, $Silverlight)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button1
            GUISetState(@SW_HIDE, $Install_Manager)
            GUISetState(@SW_SHOW, $Quicktime)
            GUISetState(@SW_HIDE, $Silverlight)
            
                    $Installcheck = FileExists(@ProgramFilesDir & "\Quicktime")
                    If $Installcheck = 1 Then
                            GUICtrlSetData($Label1q, "is installed")
                    EndIf
                    If $Installcheck = 0 Then
                            GUICtrlSetData($Label1q, "is not installed")
                    EndIf
        Case $msg = $Button1q
            Run("\\pdc-skoba\appsg\Redist\Apple\QuickTime\7.6.5\QuickTimeInstaller.exe")
        Case $msg = $Button2q
            
        Case $msg = $Button3q
            Run("MsiExec.exe /I{1451DE6B-ABE1-4F62-BE9A-B363A17588A2}") 
                WinWaitActive("QuickTime voor Windows")
                ControlClick("[CLASS:Button;INSTANCE:2]", "Installatie verwijderen", 1110)
                WinWaitActive("QuickTime voor Windows", "&Ja")
                ControlClick("[CLASS:Button; INSTANCE:1]","&Ja", 1057)
    EndSelect
WEnd
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button2
            GUISetState(@SW_HIDE, $Install_Manager)
            GUISetState(@SW_HIDE, $Quicktime)
            GUISetState(@SW_SHOW, $Silverlight)
            
                    $Installcheck = FileExists(@ProgramFilesDir & "\Microsoft Silverlight")
                    If $Installcheck = 1 Then
                            GUICtrlSetData($Label1s, "is installed")
                    EndIf
                    If $Installcheck = 0 Then
                            GUICtrlSetData($Label1s, "is not installed")
                    EndIf
        Case $msg = $Button1s
                
        Case $msg = $Button2s
        
        Case $msg = $Button3s
        
    EndSelect
WEnd

I cant seem to get The "deinstall" Button work, try it out if you want and tell me what I am doing wrong.

Thanx,

Teun

Share this post


Link to post
Share on other sites



nvm, fixed >.<

Share this post


Link to post
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
Sign in to follow this  
Followers 0