Jump to content

Trying to launch another application with a script


Aeremis
 Share

Recommended Posts

I have an older application that uses installshield.  What I did is create an answer file, but when I run the command line that points to the answer file it does everything I need, but pops up a window at the end.  I want to close the window so I can continue on with a silent install.  I thought I could use AutoIT to help with that.  This is the command that I am trying to get AutoIT to use:

"setup.exe " /s /a /s /sms /f1"setup.iss"

I'd like to get an AutoIT script to run the above command and then use AutoIT to close the window that pops up at the end of the installation.  I've already created the portion of the script to close the windows, but unfortunately I am having some problems getting the above command to run in AutoIT.

Edited by Aeremis
Link to comment
Share on other sites

  • Moderators

Try something like this:

ShellExecuteWait("Setup.exe", '/s /a /s /sms /f1"setup.iss"')

"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

Thanks JLogan3o13.  That line works perfectly. 

The problem I am having now is that the window still pops up even after this run.  Can you review this and let me know what it is I am doing wrong?

   #RequireAdmin
 FileChangeDir ("ReportSmith Install")
 ShellExecuteWait ("setup.exe", '/s /a /s /sms /f1"setup.iss"')

 WinWait ("ReportSmith 3.10 README.TXT", "This is the ReportSmith README.TXT.")
 WinActivate ("ReportSmith 3.10 README.TXT", "This is the ReportSmith README.TXT..")
 ControlClick ("ReportSmith 3.10 README.TXT", "WThis is the ReportSmith README.TXT.", 1)

I need this window to go away or close so it will kick off to the other steps I have worked out after this. 

Link to comment
Share on other sites

  • Moderators

Have you tried just using WinClose?

WinWait("ReportSmith 3.10 README.TXT", "")
WinClose("ReportSmith 3.10 README.TXT", "")

"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

Okay I guess it didn't fix it.  It worked twice but the window still sits there.  I'm not sure what it is that's holding it up.  Here is what I have so far.

   #RequireAdmin
 FileChangeDir ("ReportSmith Install")
 ShellExecuteWait ("setup.exe", '/s /a /s /sms /f1"setup.iss"')
 WinWait ("ReportSmith 3.10 README.TXT", "")
 WinClose ("ReportSmith 3.10 README.TXT", "")

I think whats happening is that the Window isn't getting closed because its part of the ShellExecuteWait ("setup.exe", '/s /a /s /sms /f1"setup.iss'")  It won't go to the next step until that first step finishes.  Since that window is part of that first step it won't move on.  Does that make sense?  What would my next step be?  Any suggestions?

Edited by Aeremis
Link to comment
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
 Share

  • Recently Browsing   0 members

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