Jump to content

How do i hide the install window in autoit


hevnbnd

Recommended Posts

Not sure if this is possible, but i am just learning how to use autoit and just created a script to install quickbooks and was wondering if there is a way to hide all the quickbooks stuff that comes up. I want it silent. Without seeing anything on quickbooks. Is this possible? My autoit script looks like this so far. Whatcha think?

Run("setup.exe")

WinWaitActive("QuickBooks Installation", "To continue with the QuickBooks installation")

Send("!n")

WinWaitActive("QuickBooks Installation","If you agree to the terms")

Send("!a")

Send("!n")

WinWaitActive("QuickBooks Installation", "License Number and Product Number")

Send("xxxSERIALxxx{TAB}886833")

Send("!n")

WinWaitActive("QuickBooks Installation", "Select Installation Folder")

ControlCommand("QuickBooks Installation", "Place service and support icons on my desktop","Button5","UnCheck")

Send("!n")

WinWaitActive("QuickBooks Installation", "Ready to install QuickBooks")

Send("!i")

WinWaitActive("QuickBooks Installation", "QuickBooks Installation Complete")

Send("!f")

Link to comment
Share on other sites


Send() requires an active window, so WinSetTrans() could be used to make the installer window invisible.

If you use Control*() functions instead of Send(), then you can use WinMove() to move the 1st installer window off screen, then the remaining windows should also open offscreen. Another option could be to use WinSetState() though it is not as good as you would need to use it on each window that appears. Use WinWait() when using Control*() functions as windows do not need to be active to automate them.

:)

Link to comment
Share on other sites

MHz: Never thought of using WinMove() to hide a window, good thinking!

Thanks, there are tricks to doing alot of tasks. Just need to learn and make good use of them where suitable.

@hevnbnd

The posted script may work fine with WinMove(), with it's current syntax.

Here is a little sample code that can show how WinMove() simply does hide the window off screen.

Run('notepad')
WinWait('Untitled')
Sleep(1000)
WinMove('Untitled', '', @DesktopWidth, 10)
Sleep(1000)
Send('did I work ok')
Sleep(1000)
For $i = @DesktopWidth To 0 Step -10
WinMove('Untitled', '', $i, 10)
Sleep(10)
Next
Sleep(3000)
WinKill('Untitled')

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
  • Recently Browsing   0 members

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