shandyboy Posted August 11, 2022 Share Posted August 11, 2022 Hi This might be a daft question as AutoIT is new to me and I'm still finding my feet. I'm trying to install a piece of software that installs more than one application during the installation. I've managed to create a script that installs the software. The vendor creates an uninstall script that just uninstalls the main application. If the application is reinstalled or the other applications already exist the script no longer works as the installation takes a different path and tries to uninstall one of the drivers by default. I was trying to use an IF statement along with the winactive + text to try and identify if the "prereq" was or wasn't already installed. Is this possible to do it like this or is there a better way to do this? This is the offending window and this is the part of the script that I was trying but I don't think it is correctly detecting the string part Run(@ScriptDir & '\TU-S9_PL2303_Prolific_DriverInstaller_v1.12.0.exe') IF String(WinActive ("PL2303 USB-to-Serial Driver Installer Program", "Remove all installed features")) Then Send ("{TAB 2}{ENTER}") Send("Y") Send("{ENTER}") Else ; run new driver install wizard screen Send("{ENTER}") EndIf Link to comment Share on other sites More sharing options...
Developers Jos Posted August 11, 2022 Developers Share Posted August 11, 2022 Did you try to simply use the silent install (/S) to avoid any interaction? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
shandyboy Posted August 11, 2022 Author Share Posted August 11, 2022 Hi Jos Thanks for coming back to me, whilst the PL2303 drivers itself can be packaged and deployed silently (which it currently is via sccm) the main application cant be ran silently, hence why I was using AutoIT. The main clinical application ( which by its nature prevents me from doing too much to it) has been write in such a way that rather than ignoring the fact it's already installed triggers the msi of the PL2303 to run a repair/modify/uninstall. Link to comment Share on other sites More sharing options...
Developers Jos Posted August 11, 2022 Developers Share Posted August 11, 2022 So, can't you run the MSI before the installer and get it to deinstall the old version ( with /x I believe) ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Subz Posted August 11, 2022 Share Posted August 11, 2022 Normally I'd check if the software was installed, just run RegRead for DisplayName in the following location (you need to know the {Guid} or you have to use RegEnumKey) HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{Guid} HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{Guid} If found then you can just use Msiexec.exe /x {Guid} /QN /NoRestart to uninstall silently. Link to comment Share on other sites More sharing options...
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