g0dzilla

Dynamically wait for SolidWorks installation Manager

3 posts in this topic

Hello everyone,

Currently, I am working in an automated script for a personal project. Basically I am trying to install SolidWorks 2015x64 from the network.

So far, I started to work with the installation Manager Window loaded by the user. Then, after sometime I was able to locate the coordinates and use mouseclick to "click" the buttons within the Installation Manager window. Since “AutoIT Window-Info is unable to locate the controls/clases..etc of the installation window”. Honestly, this has been a painful process. As SolidWorks installation Manager uses a different GUI that I believed is incompatible with AutoIT Window.

Anyhow, my main issue here occurs when I ran the Setup.exe within my script. Somehow, I am unable to find the correct way to pause my script until the window has successfully loaded. As you can see in the attached picture. There is a small gap where the application is loading. So far I tried 

Local $sw15path ="\\2015\SOLIDWORKS 2015 x64 SP0\setup.exe";locate the setup ont he network
Run($sw15path)
WinWaitActive("SOLIDWORKS 2015 SP0 Installation Manager (X64 Edition)");wait for the app to load
Local $mangsw15 = WinGetHandle("SOLIDWORKS 2015 SP0 Installation Manager (X64 Edition)")
local $wincrd= WinGetPos($mangsw15);obtain the px size of the window
MouseClick("left",$wincrd[0]+878,$wincrd[1]+ 621);next button

 

But is not working.....I am aware that using a simple Sleep(#sec) will hold my script. But in my case the location of the executable file is within the network. Therefore, loading time is closely related to the demand & speed of the network.

If anyone could provide me some feedback. It would be greatly appreciated

Thanks

 

 

SW_IM.PNG

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I've experimented a lot with the automation of program installations and have come to the conclusion that using simulated keystrokes and mouseclicks for software installation is never a good idea.

Most software-installers today gets supplied with an option that's called "silent installing" which performs an installation routine with set parameters without any GUI.

Use ShellExecuteWait or RunWait to know when the installation is done - you also get an exit code from there whether it succeeded or not.

Check out this link.

Edited by Radiance

Share this post


Link to post
Share on other sites

Even if you cant find the id's and such of the buttons with the Autoit Window tool, you should be able to atleast wait for the Window itself.

A WinWait() will hold the script until it is a valid window.  If your talking about the window appearing and you need to wait for the program to fully install, you may just need to go with Sleep() to add some extra time.

Also if the network speed is an issue, instead of installing directly over the network (not a best practice in a lot of cases anyways) make a file copy your first task and move the file from the network to the local disk and then do the install.

 

Also as mentioned look into silent install, it looks like I found many hits with google that may lead to the methods to do it.

One example: https://forum.solidworks.com/thread/52711

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