tuffgong Posted March 26, 2014 Posted March 26, 2014 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!
FireFox Posted March 26, 2014 Posted March 26, 2014 If you want the basic help, the helpfile is you friend Br, FireFox.
tuffgong Posted March 26, 2014 Author Posted March 26, 2014 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.
tuffgong Posted March 26, 2014 Author Posted March 26, 2014 Finally found it: FileExists. Got it, thanks.
Starstar Posted March 26, 2014 Posted March 26, 2014 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."
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now