Jump to content
Sign in to follow this  
gribbit

Multiple WinWaitActive Windows

Recommended Posts

gribbit

Hi All,

If I run(an msi file).... it can pop up with different windows (if installed or not)

Please could somebody kindly advise what is the best way to choose the active Window and run a relevant script  for that Window

I have tried if ..then, case...select and even if i change the scripts to func it still defeats me :(

I've created both scripts that run fine standalone, I just want to combine it into one script

 

Share this post


Link to post
Share on other sites
JLogan3o13

If it is an MSI, why are you not running it with either the /qb or the /qn switch, and avoiding the windows altogether?


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

Share this post


Link to post
Share on other sites
gribbit

Thanks all for the info, I'll have a look at this one. my msi file needs to be customised, not sure if the switches can do this, but it definetely looks very interesting.

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, gribbit. Google msi set global properties, there are a ton of docs out there about customizing the MSI completely through the command line. Below is just one of the links I've used before, which shows some of the properties you can set.

 

http://www.advancedinstaller.com/user-guide/properties.html

Edited by JLogan3o13

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

Share this post


Link to post
Share on other sites
gribbit

Thanks all, but I'm still floundering here :(, I suppose I didn't explain very well, can any kind soul tell me why this does not run.... if I run a program I can get a choice of 2 windows appearing, if one appears I want to do this... and if the othe appears I need to do something else... Just not sure how???

Func _myfunct()
    If WinWaitActive("Program name - InstallShield Wizard", "This setup will perform an upgrade") Then
        _dtupg(); if this window appears run this func 
        
        If WinWaitActive("No title", "Another version of this product is already installed") Then
            _dtexit() ; if this Window is active, then run this func
        EndIf
    EndIf
EndFunc   ;==>_myfunct

Share this post


Link to post
Share on other sites
Bert

what you posted does not use command line switches. Did you try to run the installer like this example?

run('msiexec /i "ServerAPPSSingle_Signon_ManagerSSO_v6NovellSecureLogin_6.0_Patch.msi" /passive /norestart')

Edited by YogiBear

Share this post


Link to post
Share on other sites
Chimp

 

Thanks all, but I'm still floundering here :(, I suppose I didn't explain very well, can any kind soul tell me why this does not run.... if I run a program I can get a choice of 2 windows appearing, if one appears I want to do this... and if the othe appears I need to do something else... Just not sure how???

Func _myfunct()
    If WinWaitActive("Program name - InstallShield Wizard", "This setup will perform an upgrade") Then
        _dtupg(); if this window appears run this func 
        
        If WinWaitActive("No title", "Another version of this product is already installed") Then
            _dtexit() ; if this Window is active, then run this func
        EndIf
    EndIf
EndFunc   ;==>_myfunct

 

try with WinActive() instead of WinWaitActive()

Edited by Pincopanco

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites
Chimp

try with WinActive() instead of WinWaitActive()

 

Also:

Move up the first EndIF and transform it in an ElseIF like this

Func _myfunct()
    If WinActive("Program name - InstallShield Wizard", "This setup will perform an upgrade") Then
        _dtupg(); if this window appears run this func

    ElseIf WinActive("No title", "Another version of this produc    t is already installed") Then
        _dtexit() ; if this Window is active, then run this func
        ;       EndIf   <--- this Endif  moved UP and become ElseIf
    EndIf
EndFunc   ;==>_myfunct

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

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  

×