Sign in to follow this  
Followers 0
tuffgong

Dependency Check

5 posts in this topic

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!

Share this post


Link to post
Share on other sites



If you want the basic help, the helpfile is you friend ;)

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Finally found it: FileExists. Got it, thanks.

Share this post


Link to post
Share on other sites

you can use RegRead FileExist etc to check something is exist or not..............


Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."

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