gribbit Posted August 7, 2013 Share Posted August 7, 2013 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 Link to comment Share on other sites More sharing options...
Bert Posted August 7, 2013 Share Posted August 7, 2013 Are you trying to install multiple apps on a PC? If yes, I have something that can help The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 7, 2013 Moderators Share Posted August 7, 2013 If it is an MSI, why are you not running it with either the /qb or the /qn switch, and avoiding the windows altogether? "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! Link to comment Share on other sites More sharing options...
Bert Posted August 7, 2013 Share Posted August 7, 2013 (edited) True that. You can run MSI packages with command line switches. Look at title="">The Vollatran project. It will show how to do this and odds are help you with your problem. Edited August 7, 2013 by YogiBear The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
gribbit Posted August 7, 2013 Author Share Posted August 7, 2013 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. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 7, 2013 Moderators Share Posted August 7, 2013 (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 August 7, 2013 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! Link to comment Share on other sites More sharing options...
gribbit Posted August 10, 2013 Author Share Posted August 10, 2013 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 Link to comment Share on other sites More sharing options...
Bert Posted August 11, 2013 Share Posted August 11, 2013 (edited) 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 August 11, 2013 by YogiBear The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Gianni Posted August 11, 2013 Share Posted August 11, 2013 (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 August 11, 2013 by Pincopanco Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Gianni Posted August 11, 2013 Share Posted August 11, 2013 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 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... 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