Sign in to follow this  
Followers 0
StMaSi

If...Then...Else...Endif

4 posts in this topic

I'm working on a driver installer as part of another application installer package and i have the "new" installation perfected. However, if the driver is already installed, and the user executes the application installer package, the driver installation window changes, so my AutoIt script no longer works. How can I embed "if...then...else...endif" logic to accommodate the different windows as pertains to the driver installation. Is there a way to check to see if the driver is already installed via the Add/Remove Programs control panel applet, or any other method that I can utilize within my AutoIt script? Thanx.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi, StMaSi, welcome to the forum. Usually when I am doing an application installer, I do my checks first, and then call the install in a function. Most installations can be found under HKLMSOFTWAREMicrosoftWindowsCurrentVersionUninstall. Find the key that pertains to your product, and then a value inside that key. I usually use DisplayName. For example:

$var = RegRead("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}", "DisplayName")

If $var = "PDFCreator" Then
;;Whatever you would like to do if the product is already installed, i.e. Exit.
Else
_install()
EndIf

Func _install()
;Do instally stuff
EndFunc
Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

This worked perfectly!

THANK YOU!!!

:ILA2:

Share this post


Link to post
Share on other sites

Glad I could help :)


√-1 2^3 ∑ π, and it was delicious!

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