Jump to content

Dependency Check


Recommended Posts

Good Morning,

     I have been looking to get educated on this all morning and some help from this awesome forum would be very much appreciated! I mostly do servers and networking but I dabble in scripting and automation. For our development team, I created an AutoIT script that uninstalls an older program then installs the Pre-Req's for the new version. It works great.

     The problem is, the development team "tested" this so extensively, the Pre-Req portion is now installed on 10-20% of the target machines! Ugh! If a PC already has the Pre-Req, the script fails with a message that is confusing to the user. They want me to build an "if/then" check into the script so that it does the following:

1. Uninstall old

2. Check to see if this machine already has Pre-Req's.

3. If "True" end, if "False" install Pre-Req's.

     This is beyond me. Is this possible? I do not know the method/syntax to check for a file, folder, registry key, or add & remove programs. The syntax for the if/then/else would also be helpful. Thanks in advance!

Link to comment
Share on other sites

Thanks for the response. Yes, I have read the help files on Conditional Statements and If...Then...Else and I think  I can get through that. How do I check for the condition? Does this file/registry key/folder exist? Is <program in question> in "Add & Remove Programs"? I am not even sure what to search for in the help file for that.

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...