Jump to content

Recommended Posts

Posted

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

 

Posted

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.

  • Moderators
Posted (edited)

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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted

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
Posted (edited)

 

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

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

Posted

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

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...