Jump to content
Sign in to follow this  
Aeremis

Creating an Installer Script for the first time.

Recommended Posts

Aeremis

Here is an example of the script I have written, please keep in mind I am very new to this.  :)

I have done well so far, but I am hitting a snag.  What I would like to do is have the installation go to a specific folder location.  I do not know the command that I would need to put that information into the script so that it will finish the installation correctly.  If you could please help me I'd appreciate it.  Thanks to all of you for helping me.

   #RequireAdmin

   ShellExecute("setup.exe")

   WinWait ("Welcome", "Welcome to the ReportSmith")
   WinActivate ("Welcome", "Welcome to the ReportSmith")
   ControlClick ("Welcome", "Welcome to the ReportSmith", 1)

   WinWait ("Setup Type", "Click the type of Setup you prefer")
   WinActivate ("Setup Type", "Click the type of Setup you prefer")
   ControlClick ("Setup Type", "Click the type of Setup you prefer", 1)

   WinWait ("Choose Destination Location", "Setup will install ReportSmith Translation Mechanism")
   WinActivate ("Choose Destination Location", "Setup will install ReportSmith Translation Mechanism")
   ControlClick ("Choose Destination Location", "Setup will install ReportSmith Translation Mechanism", 5)

   WinWait ("Choose Folder", "Please choose the installation folder.")
   WinActivate ("Choose Folder", "Please choose the installation folder.")
   ControlClick ("Choose Folder", "Please choose the installation folder.", 1161)

*****  Here is my problem.....

   ControlClick ("Choose Folder", "Please choose the installation folder.", 1)

   WinActivate ("Choose Destination Location", "Setup will install ReportSmith Translation Mechanism")
   ControlClick ("Choose Destination Location", "Setup will install ReportSmith Translation Mechanism", 1)

   WinWait ("Select ADP Product", "Please select the ADP Product")
   WinActivate ("Select ADP Product", "Please select the ADP Product")
   ControlClick ("Select ADP Product", "Please select the ADP Product", 601)
   ControlClick ("Select ADP Product", "Please select the ADP Product", 1)

   WinWait ("Get Database Type", "Please Select the Database Type")
   WinActivate ("Get Database Type", "Please Select the Database Type")
   ControlClick ("Get Database Type", "Please Select the Database Type", 601)
   ControlClick ("Get Database Type", "Please Select the Database Type", 1)

   WinWait ("Setup Complete", "Setup has finished installing ReportSmith")
   WinActivate ("Setup Complete", "Setup has finished installing ReportSmith")
   ControlClick ("Setup Complete", "Setup has finished installing ReportSmith", 1)

I listed where I am having an issue.  What I would like to do is put the path as to where to install this product instead of the default path.  Can someone please help me with telling me what command I should choose and how I would write this in? 

The path I am trying to list is as follows:  "c:program filessrsrptsmith"

Edited by Aeremis

Share this post


Link to post
Share on other sites
Aeremis

Okay I got that ControlSetText command to work.  Thank you! 

Now I have another issue, what I would like to do is select the Browse Button.  When I use the AutoIt Window Info tool it highlights the whole section and not the individual Browse Button.  I was going to upload a snapshot I took, but was unable to paste that .jpg.  So when I use the tool and I hover over the Browse Button, it highlights the entire panel.  Which includes a few text fields and the button.  I am unable to isolate that individual Browse button to get the ID.  Does anybody have any ideas or tips for me? 

Thanks again Universalist for that.

Share this post


Link to post
Share on other sites
somdcomputerguy

Maybe this function? - http://www.autoitscript.com/autoit3/docs/functions/MouseClick.htm

You're obviously already familiar with the WinActivate function, and the MouseClick function will only work on the currently active window

This will probably be needed as well - http://www.autoitscript.com/autoit3/docs/functions/AutoItSetOption.htm#MouseCoordMode


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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  

×