Sign in to follow this  
Followers 0

Hi I'm new and have Q, how to test showing progress

12 posts in this topic

Posted

Hi,

this is my first go using AutoIt. I have an application with an installshield installer. I've tried all the usual switches and repsonse file stuff but cannot get it to shut up and install.

So I am trying AutoIt and have created my first script:

Opt('WinDetectHiddenText', 1)
;Get environment variable
;$SOFTWARE=EnvGet("SOFTWARE")
$SOFTWARE="\\wpkg.myserver.com\wpkg\files"
;Path and filename of the installer executable
$SEQSCAPEINSTALLER="""" & $SOFTWARE & "\SeqScape.2.5.revB\setup.exe"""
Run($SEQSCAPEINSTALLER, @SW_HIDE)
WinWaitActive("InstallShield Wizard","")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:Next; INSTANCE:1]")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:Next; INSTANCE:1]")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:Next; INSTANCE:1]")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:Next; INSTANCE:1]")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:Finish; INSTANCE:1]")
Exit

I have run this on the cmd line with autoit3.exe \path\to\seqscape.au3

Nothing seems to happen. I have also run it from SciTe with the ouput window displaying:

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "P:\files\SeqScape.2.5.revB\seqscape.au3" /UserParams  
+>10:36:40 Starting AutoIt3Wrapper v.2.1.0.8    Environment(Language:0409  Keyboard:00000809  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (1.54.22.0)  from:C:\Program Files (x86)\AutoIt3
+>10:36:40 AU3Check ended.rc:0
>Running:(3.3.8.1):C:\Program Files (x86)\AutoIt3\autoit3.exe "P:\files\SeqScape.2.5.revB\seqscape.au3"

But the software doesn't install.

How do I debug this or watch the actual progress on screen to see where it is getting stuck or where I've gone wrong with the script?

thanks

Paul

Share this post


Link to post
Share on other sites



Posted

I've found that the AutoIt icon in the bottom right is flashing a red X. I have read on the forums this will be due to my 'WinWait'. I've changed the code as it was recorded as:

_WinWaitActivate(.....

which others have said is wrong so I've changed it to:

WinWait("InstallShield Wizard", "60")
WinActivate("InstallShield Wizard", "")

I presume AutoIt is waiting for 'InstallShield Wizard' to launch but it isn't launching.

Any ideas?

Thanks

Paul

Share this post


Link to post
Share on other sites

Posted

I've used the Info tool to examine the buttons and would like advice on whether I now have the correct text values:

ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:&Next >; INSTANCE:1]")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:&Next >; INSTANCE:1]")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:&Next >; INSTANCE:1]")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:&Next >; INSTANCE:1]")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:Finish; INSTANCE:4]")

For the Text on the Next button the Info tool says it is "&Next >" but the Finish button is just "Finish", does that look correct?

Still can't get setup.exe to run.

Share this post


Link to post
Share on other sites

Posted (edited)

Slight progress. I've learnt that the install display is supressed by @SW_HIDE so I've removed that.

I have also changed Run to the path of the application setup.exe instead of a variable. My code now looks like this:

Opt('WinDetectHiddenText', 1)
Run("p:filesSeqScape.2.5.revBsetup.exe")
;WinWaitActive("InstallShield Wizard","")
;WinWait("InstallShield Wizard", "60")
;WinActivate("InstallShield Wizard", "")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:&Next >; INSTANCE:1]")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:&Next >; INSTANCE:1]")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:&Next >; INSTANCE:1]")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:&Next >; INSTANCE:1]")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:Finish; INSTANCE:4]")
Exit

The setup.exe starts up. I get the unpacking progress bar and then the first dialog box waiting for a 'Next' clink but nothing happens. Advice please.

Thanks

Paul

Edited by csjjpm

Share this post


Link to post
Share on other sites

Posted

Silly question, but can't you just use:

Run("p:filesSeqScape.2.5.revBsetup.exe /S /v/qn")

Share this post


Link to post
Share on other sites

Posted (edited)

Run("p:filesSeqScape.2.5.revBsetup.exe")
WinWait("InstallShield Wizard", "")
WinActivate("InstallShield Wizard", "")
WinWaitActive("InstallShield Wizard", "")

ControlClick("InstallShield Wizard", "", "Button1")
ControlClick("InstallShield Wizard", "", "Button1")
ControlClick("InstallShield Wizard", "", "Button1")
ControlClick("InstallShield Wizard", "", "Button1")
ControlClick("InstallShield Wizard", "", "Button4")

EDIT: Maybe you have to add some waiting logic among each ControlClick()

Edited by Zedna

Share this post


Link to post
Share on other sites

Posted

Silly question, but can't you just use:

Run("p:filesSeqScape.2.5.revBsetup.exe /S /v/qn")

Hi, no the software still throws up prompts forcing user intervention. Whoever wrote the original InstallShield package didn't want it to be silent. There isn't any reason for it to be verbose.

In my original post I said I'd already tried all these. I have reference -fsetup.iss and edited the setup.ini so cmdline=/s /v/qn.

AutoIt is my last (but one) hope. Otherwise I may have to make my own NSIS package.

Share this post


Link to post
Share on other sites

Posted

Run("p:filesSeqScape.2.5.revBsetup.exe")
WinWait("InstallShield Wizard", "")
WinActivate("InstallShield Wizard", "")
WinWaitActive("InstallShield Wizard", "")

ControlClick("InstallShield Wizard", "", "Button1")
ControlClick("InstallShield Wizard", "", "Button1")
ControlClick("InstallShield Wizard", "", "Button1")
ControlClick("InstallShield Wizard", "", "Button1")
ControlClick("InstallShield Wizard", "", "Button4")

EDIT: Maybe you have to add some waiting logic among each ControlClick()

I do now have it working verbosely as it was all down to the winwaitactive and controlclick config. This is what I have now and it works:

Opt('WinDetectHiddenText', 1)
$SEQSCAPEINSTALLER="c:netinstseqscapesetup.exe"
Run($SEQSCAPEINSTALLER)
WinWaitActive("[CLASS:#32770]","Welcome to the InstallShield Wizard")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:&Next >; INSTANCE:1]", "left")
WinWaitActive("[CLASS:#32770]","Information")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:&Next >; INSTANCE:1]", "left")
WinWaitActive("[CLASS:#32770]","Choose Destination Location")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:&Next >; INSTANCE:1]", "left")
WinWaitActive("[CLASS:#32770]","Start Copying Files")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:&Next >; INSTANCE:1]", "left")
WinWaitActive("InstallShield Wizard","InstallShield Wizard Complete")
ControlClick("InstallShield Wizard", "", "[CLASS:Button; TEXT:Finish; INSTANCE:4]")
Exit

My next problem is I cannot get WPKG to install it. I can see setup.exe is a running process but if it is in the background then AutoIt3 does not do its thing.

Does anyone know how I can get AutoIt to do its clicks in the background/hidden?

Thanks

Paul

Share this post


Link to post
Share on other sites

Posted

I changed all my WinWaitActive to WinExists but when I do 'Go' it runs through and ends before the packages even extracts:

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "P:filesSeqScape.2.5.revBseqscape.au3" /UserParams   
+>14:22:59 Starting AutoIt3Wrapper v.2.1.0.8    Environment(Language:0409  Keyboard:00000809  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (1.54.22.0)  from:C:Program Files (x86)AutoIt3
+>14:23:00 AU3Check ended.rc:0
>Running:(3.3.8.1):C:Program Files (x86)AutoIt3autoit3.exe "P:filesSeqScape.2.5.revBseqscape.au3"   
+>14:23:00 AutoIT3.exe ended.rc:0

Share this post


Link to post
Share on other sites

Posted

I have also tried 'WinWait' instead but unless it is the top 'active' window then the controlclicks dont work.

Is there any Win???? option which will work in the background like 'WinExists'?

Share this post


Link to post
Share on other sites

Posted

I first came across AutoIT to do exactly the same as what you are trying to do. However I found it an exceptionally messy way to do what you are trying to do. I now always go back to the source to find a better way for the install package to behave rather than try to butcher a series of clicks. It is just too temperamental.

I have downloaded a demo version of the updated package that you are trying to install to see if I can either hack in or out the requirements for SETUP.EXE. There is, however, another possible option for you.

Since I assume you are trying to deploy this package silently to your users, will the computers be the same or are there some scary setups to take into account? I ask because there may be the option of creating a new MSI deployment from a clean machine installation. Havent had cause to use it in over a decade, but there used to be some tools on the Windows CD that allowed you to take a snapshot of a piece of software to be installed and then create your own MSI. Just need a clean (ie... Just built and patched) computer to take the snapshot with.

Mal

Share this post


Link to post
Share on other sites

Posted

Hi, csjjpm. Is this the Applied BioSystems SeqScape you're trying to install? If so, the setup.exe has an embedded MSI in it (the use of InstallShield to repackage it pretty much guarantees that). I was able to simply walk through the installation and then pluck the MSI out of the temp directory. Once you obtain the MSI, a simple script like this will work:

ShellExecuteWait("msiexec.exe", '/i "<path to MSI>" /qn')

there may be the option of creating a new MSI deployment from a clean machine installation. Havent had cause to use it in over a decade, but there used to be some tools on the Windows CD that allowed you to take a snapshot of a piece of software to be installed and then create your own MSI. Just need a clean (ie... Just built and patched) computer to take the snapshot with.

Mal

I think you might be referring to the old WinINSTALL package that came on the Windows 2000 resource CD. This has been bought out, and eventually deprecated, some years back. If you're looking for application repackaging your main choices right now are AdminStudio (bundled with InstallShield) or WiX if you want free. The other option, Wise Packaging Studio, will be discontinued later this year.

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  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.