Sign in to follow this  
Followers 0
Mipam

If pop-up window exists than do some action

5 posts in this topic

Hi all :) ,

I´m trying to create some installation script where during installation there is some check if IIS is really installed on windows server. When installation of IIS is indicated, than pop-up window will be displayed.

And what I need is checking this pop-up window and if this window will not be displayed(IIS is not present on machine),

than installation work flow will continue.

Part of my code:

If WinWait($Title_IIS,"What Microsoft IIS components") Then;checking IIS components 
ControlClick($Title_IIS,"What Microsoft IIS components","[NAME:btnThird]")
EndIf
Send("{ENTER}");click on Finish button/End of Installation process
WinWaitActive($Title_CW,"This wizard will walk you thro");wait for CW window

Can you someone help me how can I write "If" condition or how can I use Sleep or something similar for this part of code?

Thanks, Martin

Share this post


Link to post
Share on other sites



Seeing how you are new to coding you may want to take AutoIt 1 2 3. The class is located in the examples scripts section of the forum as a sticky.

I know AutoIt 123 but in these templates of scripts none answers are useful for me, unfortunately.

Share this post


Link to post
Share on other sites

Hello,

I happened to be working on an "Is IIS installed on this server" script this afternoon for work, and I came across this thread.

It looks like you are opening a configuration window to check on whether IIS is installed or not. I'm sure you could probably get that to work, but it seems pretty slow, and you'd have to wait while windows get opened, etc.

You should be able to check if IIS is installed or not on a single registry key:

source: http://geekswithblogs.net/sdorman/archive/2007/03/01/107732.aspx

Here is what I am using currently. It meets my needs, though you may want to expand if you have other goals.

$iiskey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp"
;takes our IIS key and checks to see if it exists. we will be using error codes to determine whether it is installed or not.
RegRead($iiskey,"")
If @error > 1 Then
MsgBox(16,"IIS Status Check Error","Unable to open registry, or main key inaccessible.")
ElseIf @error = 1 Then
MsgBox(48,"IIS NOT Installed","IIS is not installed on this server.")
ElseIf @error <1 Then
MsgBox(64,"IIS Installed","Success!" & @CRLF & "IIS is installed on this server.")
EndIf
1 person likes this

Share this post


Link to post
Share on other sites

Thanks a lot for your advice! It is really helpful for my problem. :mellow:

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