Jump to content

Silent Installation (To software there is no silent switch)


PHAK
 Share

Recommended Posts

  • Moderators

Goldwave used to accept -s for silent, but this was many moons ago. If it no longer supports that method (as the site seems to indicate) AutoIt can't magically force it to support one. You could go the and manipulate each install screen perhaps, but if you truly want it silent you would have to look into wrapping the install into an MSI. There are a number of free and low-cost tools out there for doing this.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

1. Look in the help file for WinExists and the Control* commands like ControlSend, ControlClick, etc.

   1a. Search the forum for automate install or do a Google search for site:autoitscript.com automate install. This has been discussed literally hundreds of times, and there are plenty of examples on the forum to show you how to use the Control commands to enter text, push buttons, etc.

 

2. That should have said "*There are a number of...." not here. As with above, if you do a simple Google search for Create MSI free you will come across more hits than you can count. Take your pick from WIX, AdvancedInstaller, MasterPacker, etc. 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

The moderator already answered your question there’s no magic and you will have to do a repackage if you want true silent installation. Or you can use auto IT to manually click and interact with the installer

 

if it’s an MSI package it already supports silent installation and install script packages can be made to be silent if you record a silent script other than that you need to re-package the software yourself or do a manual install using auto IT

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

On 1/8/2021 at 12:26 AM, JLogan3o13 said:

1. Look in the help file for WinExists and the Control* commands like ControlSend, ControlClick, etc.

   1a. Search the forum for automate install or do a Google search for site:autoitscript.com automate install. This has been discussed literally hundreds of times, and there are plenty of examples on the forum to show you how to use the Control commands to enter text, push buttons, etc.

 

2. That should have said "*There are a number of...." not here. As with above, if you do a simple Google search for Create MSI free you will come across more hits than you can count. Take your pick from WIX, AdvancedInstaller, MasterPacker, etc. 

What is better

ControlSend / ControlClick,

?

I try to set an example and fail

#RequireAdmin
Example()

Func Example()
    RunWait(@ScriptDir & '\GoldWave v6.51.exe')

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

    ControlSend($hWnd, "", "{ENTER}")

    Sleep(2000)

    WinClose($hWnd)
EndFunc   ;==>Example


Not good
can you help me
And give example
That's the details

Thank you

 

>>>> Window <<<<
Title:    Install
Class:    #32770
Position:    404, 258
Size:    558, 252
Style:    0x94C800C4
ExStyle:    0x00010101
Handle:    0x00000000002303C6

>>>> Control <<<<
Class:    Button
Instance:    4
ClassnameNN:    Button4
Name:    
Advanced (Class):    [CLASS:Button; INSTANCE:4]
ID:    12324
Text:    &Next >
Position:    296, 190
Size:    75, 23
ControlClick Coords:    30, 14
Style:    0x50010000
ExStyle:    0x00000004
Handle:    0x00000000001604E0

>>>> Mouse <<<<
Position:    733, 488
Cursor ID:    0
Color:    0xF0CEAB

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
This program will install GoldWave v6.51 on your system.
GoldWave is a professional digital audio editor.  Use it to play, create, edit, record, analyze, restore, or enhance audio.
To change installation settings, choose Next.  To exit without installing, choose Cancel.
< &Back
&Next >
Finish
Cancel


>>>> Hidden Text <<<<
English
Help
 

Edited by PHAK
Link to comment
Share on other sites

Link to comment
Share on other sites

I have a handy little controlclick wrapper function i posted on this forum for use in creating automated installers. I need to test all our product installers both silent and GUI so I use that.. It's called WaitForControls.au3 and it requires the use of log4a.au3 (logger)

I prefer ControlClick. I try to use ControlSend if ControlClick doesn't work

It makes it real easy to write a clean installer AutoIt script.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

portable software needs no installation, just copy the files over to the target pc, a process can be easily automated. so another option is to download the "portable" version, if such exists officially; if not, a portable version may have already been created by a 3rd party - see here for example -

although i'd recommend you take great caution with unofficial repackaging!!!

the PortableApps platform is considered reliable enough - i did not see GoldWave there, but you already mentioned that it's just an example, i'd look there for the software i want. another good resource for portable software is portablefreeware.com

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

On 1/11/2021 at 4:38 PM, Earthshine said:

I have a handy little controlclick wrapper function i posted on this forum for use in creating automated installers. I need to test all our product installers both silent and GUI so I use that.. It's called WaitForControls.au3 and it requires the use of log4a.au3 (logger)

I prefer ControlClick. I try to use ControlSend if ControlClick doesn't work

It makes it real easy to write a clean installer AutoIt script.

 

do you mean that?

Automatically wait for desired control, then manipulate it - AutoIt Example Scripts - AutoIt Forums (autoitscript.com)

 

Where do I write this

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

I would love an example

Thank you

 

 

Link to comment
Share on other sites

@Earthshine

Thanks
I succeeded

#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Add_Constants=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include 'WaitForControls.au3'
#include 'log4a.au3'

#Region ;**** Logging ****
; Enable logging and don't write to stderr
_log4a_SetEnable()
; Write to stderr, set min level to warn, customize message format
_log4a_SetErrorStream()
_log4a_SetMinLevel($LOG4A_LEVEL_INFO)
; If @compiled Then _log4a_SetMinLevel($LOG4A_LEVEL_WARN) ; Change the min level if the script is compiled
_log4a_SetFormat("${date} | ${host} | ${level} | ${message}")
#EndRegion ;**** Logging ****

Run('C:\Users\PC\Desktop\A.exe')
$handle = WinGetHandle('A.exe')

_checkClickCtrl('[CLASS:#32770]', 'Install', '[CLASS:Button; INSTANCE:4]', '&Next >')
_checkClickCtrl('[CLASS:#32770]', 'Installation Options', '[CLASS:Button; INSTANCE:11]', 'Finish')
_checkClickCtrl('[CLASS:#32770]', 'Installation Complete', '[CLASS:Button; INSTANCE:1]', 'OK')

I did well?

What am I doing that will run in the background and not be seen

I tried

WinSetState("Install", "", @SW_HIDE)

Not good

can you help?

Thank you

 

 

Edited by PHAK
Link to comment
Share on other sites

@PHAK You've done well. I was going to whip out an example for you but I was swamped at work. Try the suggestion above to see it it works. Other than that, i need to do this in my own dev environment so I can debug

 

What do you mean by run in background and not be seen? I can't really figure it out either. You can compile this and it will run silent and interact with A.exe installer. It will create a log too that you can debug with.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

@Earthshine

WinSetState("Install", "", @SW_HIDE)

I see ,a second

And only for the window "Install"

Need running in the background

Are you saying that hiding the window interferes with the installation?

No, reverse

Edited by PHAK
Link to comment
Share on other sites

42 minutes ago, Earthshine said:

If you want to interact with the buttons then you can’t hide the application.


But that's what I need 😭

theres no option?

Silent Installation ,interact with the buttons & hide the application.

In ControlSend / ControlClick ?

Or something else?

Thank you very much

Link to comment
Share on other sites

1 hour ago, PHAK said:

Silent Installation ,interact with the buttons & hide the application.

False, silent installs do not interact with GUI controls.  They simply execute code.

1 hour ago, PHAK said:

ControlSend / ControlClick ?

Yes, those can interact with hidden windows, but send and mouseClick require that the window is in focus.

1 hour ago, PHAK said:

theres no option?

Yes there is one that I used in the past to "hide" an application while it is still in focus.  You can make the window totally transparent, and block all inputs from the user while the installer interact with the application.  This of course is only viable for very short period of time...

Edited by Nine
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...