Jump to content
Sign in to follow this  
lowbot

AutoIT rerun failed scripts?

Recommended Posts

lowbot

Hello,

I wrote a simple script which installs a program from a network share. It turns out that the people who have this program already installed get an error but at reboot time the autoit script runs again trying to install the package again and again and again.

Is autoIT set to rerun itself if the script doesnt complete? If so how can I change the script to stop this and how can I stop it from happening on computers that are already running the script. Thanks.

This script is being sent via a system manager that as far as I can tell is not set to rerun failed scripts, but its a possibility. I just would like to know if this is a behavor in autoIT.

Share this post


Link to post
Share on other sites
DW1

No, autoIt does not by default rerun itself if the script does not complete.

You would need to post a copy of the script for us to look at.

Also would like to know how you deployed it.

Share this post


Link to post
Share on other sites
lowbot

This is being sent out via the everdream ECC. I'm using this to install the Office 2007 converter pack from Microsoft. Certain computers already have this pack so the installer reports "Cannot Install." But then at reboot the install starts all over again.

Well, the people at Everdream arent sure but they think when the installer exits it doesnt return a code so their software is forever stuck in Executing. They think the "executing" stage is causing this to reinstall at reboot, but they seem a little wishy-washy about this. I've tried changing the state manually but with mixed results.

I think i should be adding some logic to check to see if the software is already installed on the computer and then having the script cancel if it is. Is there a good example script on how to do this? I also believe the ECC waits for a 0 or 1 to be returned to it so it knows whether to flag the install a fail or a success. How can I tell autoit to return a 0 or a 1, or does it do this automatically. Thanks again.

Edited by lowbot

Share this post


Link to post
Share on other sites
DW1

You can do a FileExists() on one of the install files or you can do a regread() if you know a reg value from the install

Share this post


Link to post
Share on other sites
lowbot

Thanks everyone. I'll playwith with FileExists() and see if I can get this to work for my next install.

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  

×