Sign in to follow this  
Followers 0
ZeWombat

Suppress GUI's

9 posts in this topic

I made a little sript for an unattended install of AVG using AutoIT and SciTE. It works fine (as long as I don't try to compile the install prog and script into one file), but all the little GUI boxes still pop up for a second or so during install. How can I suppress them? I looked in the help file and FAQ, but the "GUICtrlSetResizing" command doesn't seem to apply here, or maybe I just can't figure out how to use it. Any advice? Thanks

Share this post


Link to post
Share on other sites



GUISetState( @SW_HIDE).. is just a guess

Normally, when asking a question like this, you will need to post code

[ autoit] ; no spaces

; paste code

[ /autoit] no spaces

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

I made a little sript for an unattended install of AVG using AutoIT and SciTE. It works fine (as long as I don't try to compile the install prog and script into one file), but all the little GUI boxes still pop up for a second or so during install. How can I suppress them? I looked in the help file and FAQ, but the "GUICtrlSetResizing" command doesn't seem to apply here, or maybe I just can't figure out how to use it. Any advice? Thanks

For clarification... Are you attempting to hide AVG's GUI?

[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites

Thanks for the quick response Valuater, here's my code..I just basically used the same techniques shown in the WinZip tutorial from the AutoIT help file. I've never written a line of code in my life, so it's all greek to me :whistle: .

The GUISetState line at the top I added ofter you told me about it, but no luck there. All the little boxes still popped up, dang it. The GUICtrlSetResizing line at the bottom is the command I thought I was supposed to use, but it says that you have to have created the GUI yourself using $WS_SIZEBOX and $WS_SYSMENU. Since I didn't create them I got stuck there. I know I'm offbase, but where do I look from here? Thanks again!

[ autoit] ; no spaces

; Script Start - Add your code below here

run("avgsetup.exe")

GUISetState(@SW_HIDE)

WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "Welcome to the AVG Setup program")

send("!N")

WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "Agreement on Use of an AVG Free")

send("!A")

WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "standard configuration, which ")

send("!S")

send("!N")

WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "the e-mail sent to your e-mail")

send("!N")

WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "Please review the information")

send("!F")

WinWaitActive("AVG 7.5 build 446 (2/21/2007)", " has been successfully installed")

send("!O")

WinWaitActive("AVG Free - First Run", "simple steps remain")

send("{SPACE}")

WinWaitActive("AVG Free - First Run", "New virus threats appear often")

send("{SPACE}")

WinWaitActive("AVG Free - First Run", "Set the priority level")

send("{SPACE}")

WinWaitActive("AVG Free - First Run", "Would you like to scan")

send("{SPACE}")

WinWaitActive("AVG Free - First Run", "After the registration you will")

send("{SPACE}")

WinWaitActive("AVG Free - First Run", "YOUR COMPUTER IS PROTECTED")

send("{SPACE}")

WinWaitActive("AVG Free Edition - Test Center")

WinClose("AVG Free Edition - Test Center")

GUICtrlSetResizing("What goes here?"

[ /autoit] no spaces

Share this post


Link to post
Share on other sites

Yes Spookmeister, I'm trying to get rid of all the little avg boxes that pop up during setup. Kinda picky, I know :whistle:

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

like this but remove the space between [ a

................................................................^ here

[ autoit] ; no spaces

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I giggled a little. :whistle: Thanks!

run("avgsetup.exe")
GUISetState(@SW_HIDE)
WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "Welcome to the AVG Setup program")
send("!N")

WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "Agreement on Use of an AVG Free")
send("!A")

WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "standard configuration, which ")
send("!S")
send("!N")

WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "the e-mail sent to your e-mail")
send("!N")

WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "Please review the information")
send("!F")

WinWaitActive("AVG 7.5 build 446 (2/21/2007)", " has been successfully installed")
send("!O")

WinWaitActive("AVG Free - First Run", "simple steps remain")
send("{SPACE}")

WinWaitActive("AVG Free - First Run", "New virus threats appear often")
send("{SPACE}")

WinWaitActive("AVG Free - First Run", "Set the priority level")
send("{SPACE}")

WinWaitActive("AVG Free - First Run", "Would you like to scan")
send("{SPACE}")

WinWaitActive("AVG Free - First Run", "After the registration you will")
send("{SPACE}")

WinWaitActive("AVG Free - First Run", "YOUR COMPUTER IS PROTECTED")
send("{SPACE}")

WinWaitActive("AVG Free Edition - Test Center")
WinClose("AVG Free Edition - Test Center")

GUICtrlSetResizing("What goes here?")

Fixed. ^^

I don't know of any way to hide the program entirely. If it was an AutoIt GUI it'd be easy.

Also, I don't think that the GUICtrlSetResizing will help out any since it's not an AutoIt GUI. :P

-edit-

What about WinSetState?

WinSetState ( "title", "text", flag )

The "show" flag of the executed program:

@SW_HIDE = Hide window

@SW_SHOW = Shows a previously hidden window

@SW_MINIMIZE = Minimize window

@SW_MAXIMIZE = Maximize window

@SW_RESTORE = Undoes a window minimization or maximization

@SW_DISABLE = Disables the window

@SW_ENABLE = Enables the window

Edited by Eru

Share this post


Link to post
Share on other sites

OK, now we're getting somewhere. The winsetstate command does something, not quite sure what, but something! Found I had to put the command before every line or it wouldn't work. @SW_DISABLE breaks the install for some reason so i tossed that one. @SW_MINIMIZE minimizes the windows, but it has a weird flaw...you have to maximize some of the windows for a sec or it stalls at that point. if you click on the minimized window though, they pop up and the pop right back down again and the install continues. @SW_HIDE seems to make it most of the way through the install before stalling but I can't tell where it stops 'cause, well, the windows are hidden :whistle: code follows: any ideas? Thanks again!

; Script Start - Add your code below here

run("avgsetup.exe")
WinSetState ("AVG 7.5 build 446 (2/21/2007)", "",@SW_HIDE)
WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "Welcome to the AVG Setup program")
send("!N")

WinSetState ("AVG 7.5 build 446 (2/21/2007)", "",@SW_HIDE)
WinWaitActive("AVG 7.5 build 446 (2/21/2007)",  "Agreement on Use of an AVG Free")
send("!A")

WinSetState ("AVG 7.5 build 446 (2/21/2007)", "",@SW_HIDE)
WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "standard configuration, which ")
send("!S")
send("!N")

WinSetState ("AVG 7.5 build 446 (2/21/2007)", "",@SW_HIDE)
WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "the e-mail sent to your e-mail") 
send("!N")

WinSetState ("AVG 7.5 build 446 (2/21/2007)", "",@SW_HIDE)
WinWaitActive("AVG 7.5 build 446 (2/21/2007)", "Please review the information")
send("!F")

WinSetState ("AVG 7.5 build 446 (2/21/2007)", "",@SW_HIDE)
WinWaitActive("AVG 7.5 build 446 (2/21/2007)", " has been successfully installed")
send("!O")

WinSetState ("AVG Free - First Run", "",@SW_HIDE)
WinWaitActive("AVG Free - First Run", "simple steps remain")
send("{SPACE}")

WinSetState ("AVG Free - First Run", "",@SW_HIDE)
WinWaitActive("AVG Free - First Run", "New virus threats appear often")
send("{SPACE}")

WinSetState ("AVG Free - First Run", "",@SW_HIDE)
WinWaitActive("AVG Free - First Run", "Set the priority level")
send("{SPACE}")

WinSetState ("AVG Free - First Run", "",@SW_HIDE)
WinWaitActive("AVG Free - First Run", "Would you like to scan")
send("{SPACE}")

WinSetState ("AVG Free - First Run", "",@SW_HIDE)
WinWaitActive("AVG Free - First Run", "After the registration you will")
send("{SPACE}")

WinSetState ("AVG Free - First Run", "",@SW_HIDE)
WinWaitActive("AVG Free - First Run", "YOUR COMPUTER IS PROTECTED")
send("{SPACE}")

WinWaitActive("AVG Free Edition - Test Center")
WinClose("AVG Free Edition - Test Center")

Share this post


Link to post
Share on other sites

Taken from a script I've been writing:

Func avg()
    Local $val
    Local $file = @ScriptDir & "\installers\avg75free_446a965.exe"
    
    If FileExists($file) Then
        $val = RunWait($file & " /HIDE /DONT_START_APPS /NO_WELCOME /QUIT_IF_INSTALLED", @ScriptDir & "\installers\", @SW_HIDE)
        Return $val
    Else
        MsgBox(48, $title, "avg75free_446a965.exe could not be found.")
    EndIf
EndFunc

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