大概是这个意思。。。我试试行不行。Local $bigfix = IniRead('Settings.ini', 'address', 'bigfix', 'd:\BigFixClient\setup.exe')
Local $iMsgBoxAnswer, $key, $data = '', $temp, $i = 1
Local $uninstall = 'HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
Func __Install()
ShellExecute($bigfix)
WinWaitActive('Tivoli Endpoint Manager Client - InstallShield Wizard', 'Welcome to the InstallShield Wizard for Tivoli Endpoint Manager Client')
Send('!N')
WinWaitActive('Tivoli Endpoint Manager Client - InstallShield Wizard', 'Destination Folder')
Send('!N')
WinWaitActive('Tivoli Endpoint Manager Client - InstallShield Wizard', 'Ready to Install the Program')
Send('!I')
WinWaitActive('Tivoli Endpoint Manager Client - InstallShield Wizard', 'InstallShield Wizard Complete')
Send('!F')
EndFUnc ;==>__Install
While 1
$key = RegEnumKey($uninstall, $i)
If $key = '' Then ExitLoop
$temp = RegRead($uninstall & '\' & $key, 'DisplayName')
If $temp = 'Tivoli Endpoint Manager Client' Then
$data = RegRead($uninstall & '\' & $key, 'UninstallString')
ExitLoop
EndIf
$i += 1
WEnd
If $data = ""Then
__Install()
Else
$iMsgBoxAnswer = MsgBox(33, 'Bigfix Client has been installed.',"Please confirm Bigfix Client version, Uninstall Bigfix Client Click 'OK'", 15)
If $iMsgBoxAnswer = 1 Then ;OK
MsgBox(4096, "warning", $data, 5)
RunWait($data)
__Install()
EndIf
EndIf
|