Jump to content
Sign in to follow this  
Aeremis

Trying to launch another application with a script

Recommended Posts

Aeremis

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

Share this post


Link to post
Share on other sites
JLogan3o13

Try something like this:

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

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

Share this post


Link to post
Share on other sites
Aeremis

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. 

Share this post


Link to post
Share on other sites
JLogan3o13

Have you tried just using WinClose?

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

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

Share this post


Link to post
Share on other sites
Aeremis

Thank you very much JLogan.  That worked.  My alignment was off but once I fixed that it worked.  Thank you again.

Edited by Aeremis

Share this post


Link to post
Share on other sites
Aeremis

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

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  

×