Sign in to follow this  
Followers 0
heygfy

Need help: Script does not end

3 posts in this topic

I have writen a script to uninstall an older app we have. The script runs fine and the uninstall is a success, however the script does not end after the uninstall is finished. The AutoIt icon will stay in the task tray for hours unless there is a reboot, log off, or a user exits the script.

Any ideas on how to fix this? I do not want to force a reboot as I run this script on PC's while the user is working.

Thanks for any help.

Here is the script

; iCreate Uninstall (Setup.exe)

Run("C:\Program Files\InstallShield Installation Information\{36A01BB3-BF11-47C5-946F-5077FD27462D}\Setup.exe")

WinWaitActive("iCreate v4.02.008 EP2 with iEncore Installation", "Welcome")

Send("!r")

Send("!n")

WinWaitActive("Confirm Uninstall", "Do you")

Send("{ENTER}")

;*********************************************************************************

;***************Added this part to configm removal or "ReadOnly" files************

;*********************************************************************************

WinWaitActive("ReadOnly File Detected", "An", 5)

Send("{SPACE}")

Send("!y")

;***************************************************************************************************

*****

;***************Added this part to cover the few PC's that throw a "Self Registration" error*************

;***************************************************************************************************

*****

WinWaitActive("Self-Registration Error", "The", 5)

Send("{ENTER}")

WinWaitActive("iCreate v4.02.008 EP2 with iEncore Installation", "Maintenance Complete")

Send("!f")

Send("{ENTER}")

;End

Share this post


Link to post
Share on other sites



might want to put the last section in an adlib function, use if WinExists or such in the adlib


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

HI,

not very nice, but should work. :D

Just set $end to seconds when script should end in every case.

; iCreate Uninstall (Setup.exe)
Global $count = 0
Global $end = 100; seconds
AdlibEnable("myadlib")

Run("C:\Program Files\InstallShield Installation Information\{36A01BB3-BF11-47C5-946F-5077FD27462D}\Setup.exe")
WinWaitActive("iCreate v4.02.008 EP2 with iEncore Installation", "Welcome")
Send("!r")
Send("!n")
WinWaitActive("Confirm Uninstall", "Do you")
Send("{ENTER}")

;*********************************************************************************
;***************Added this part to configm removal or "ReadOnly" files************
;*********************************************************************************
WinWaitActive("ReadOnly File Detected", "An", 5)
Send("{SPACE}")
Send("!y")

;***************************************************************************************************


;***************Added this part to cover the few PC's that throw a "Self Registration" error*************
;***************************************************************************************************


WinWaitActive("Self-Registration Error", "The", 5)
Send("{ENTER}")
WinWaitActive("iCreate v4.02.008 EP2 with iEncore Installation", "Maintenance Complete")
Send("!f")
Send("{ENTER}")
;End 

Func myadlib()
    $count += 1
    If $count / 4 = $end Then Exit(0)
EndFunc

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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