Jump to content

Silent Installation (To software there is no silent switch)


PHAK
 Share

Recommended Posts

Does UI Automation work with hidden windows? I've never needed to interact with one before, so I haven't tried

Edit: Nope, completely hidden windows (set with @SW_Hide) don't appear in the tree anymore. There may be another fancy way to find them, but that's beyond me. Mentioned here

Edited by seadoggie01

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

Yes you can if the object has the InvokePatternAvailable, you can use the invoke method to click or select the control.

Retracting you cannot, as far as my current test goes...

Edited by Nine
Link to comment
Share on other sites

UI Automation does work if you move the window completely off the screen, however. It's not as nice as hidden, but it could work.

Has anyone tried executing code in a new/separate desktop (like in Windows 10)? I'd be interested to see how well it works. It would be annoying if there were flashing icons from activating windows though.

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

2 hours ago, Earthshine said:

Yes, if you can hide it, he says it should work, or you could move it off screen so it isn't visible.

Well
How do I hide?

Of course, also install 😀

I would love an example

Thank you

Edited by PHAK
Link to comment
Share on other sites

1 hour ago, abberration said:

What about just minimizing the window?

Depends on the selected solution.  For example, with UIAutomation, some actions cannot be done on a minimized window.  Of course, send and mouseClick will not work...Unfortunately, there is no general guidelines.  Just use the solution that works on that specific installer.

Link to comment
Share on other sites

11 hours ago, abberration said:

What about just minimizing the window? I haven't tried this, but maybe that could be an option.

Not good for me

Only hide window

Not to see

9 hours ago, Earthshine said:

I don’t even know what application you want to minimize or hide so how could I give you an example?

Take for example

https://www.goldwave.com/download.php?file=gw

(I know it has a quiet switch)

This is just an example

to understand

idea
What to do for software that does not have a silent switch
Install Hidden

Link to comment
Share on other sites

Been software packager for a number of years and in my experience when you come across software with no switches, we just repackage the software completely, we install the software, identify the changes on the system (registry, files/folders) and then use something like InnoSetup (free) to recreate the installer, this gives us the benefit of installing/uninstalling silently.  Software like InstallShield can also do this for you however it's expensive (we pay approx $20k per license), but this allows us to repackage software as an msi, although we only do this if an exe doesn't have silent switches.

The issue with functions like ControlClick, ControlSend etc... is that users can break the install easily.

Just my 2 cents.

Link to comment
Share on other sites

 How to use the ControlClick function?

#RequireAdmin

RunWait(@ScriptDir & '\A.exe')


$hWindow = WinWait("Install")
$iReturnValue = ControlClick($hWindow, "", "[CLASS:Button; INSTANCE:4]")
#RequireAdmin

RunWait(@ScriptDir & '\A.exe')

Local $hWnd = WinWait("[CLASS:#32770]", "", 10)

ControlClick($hWnd, "", "Button4")

Nothing good :(

how do I do it?

And what do I add

That it will be hidden from beginning to end

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
 Share

  • Recently Browsing   0 members

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