JesimomJR Posted July 14, 2022 Share Posted July 14, 2022 Hello friends! I started using AutoIt not long ago. I recently developed a script that installs all the necessary programs after formatting the computer. The Script simulates mouse clicks on the "next" and "finish" buttons. However, I need your help. I want all the script automation to happen in a hidden way. Example: I want programs to install silently. I want to see only the icon of the script running and at the end I want the message that the script is finished. Follow and example below: Link to comment Share on other sites More sharing options...
Developers Jos Posted July 14, 2022 Developers Share Posted July 14, 2022 Moved to the appropriate forum. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
JesimomJR Posted July 14, 2022 Author Share Posted July 14, 2022 Should I keep waiting for help or do I need to create a new topic? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 14, 2022 Moderators Share Posted July 14, 2022 JesimomJR, Do NOT create a new topic - all we have done is move your thread to the correct section. But please remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You just have to wait until someone who knows something about your particular problem, and is willing to help, comes online. Be patient and someone will answer eventually. M23 Loc 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JesimomJR Posted July 14, 2022 Author Share Posted July 14, 2022 Just now, Melba23 said: Jesimom JR, NÃO crie um novo tópico - tudo o que fizemos foi mover seu tópico para a seção correta. Mas lembre-se que este não é um fórum de suporte 24 horas por dia, 7 dias por semana - aqueles que respondem estão aqui apenas porque gostam de ajudar os outros e têm algum tempo de sobra. Você só precisa esperar até que alguém que saiba algo sobre seu problema específico e esteja disposto a ajudar fique online. Seja paciente e alguém responderá eventualmente. M23 Thanks, I'll keep waiting for help! Link to comment Share on other sites More sharing options...
Musashi Posted July 14, 2022 Share Posted July 14, 2022 3 hours ago, JesimomJR said: I recently developed a script that installs all the necessary programs after formatting the computer. The Script simulates mouse clicks on the "next" and "finish" buttons. However, I need your help. I want all the script automation to happen in a hidden way. Example: I want programs to install silently. Your question is unfortunately not easy to answer (which programs do you consider as necessary? ). Many programs offer a silent installation (Keywords : Quiet or Silent mode, /q , /s , -q, -s etc.). The desired settings are passed via command line parameters. The amount and complexity of these parameters depends on the respective software. Example : WinRAR (from : https://documentation.help/WinRAR/HELPHints.htm ) Spoiler How to install WinRAR in silent mode If you need to install WinRAR to a large number of computers, it may be boring to answer to setup questions again and again. In such case you may run WinRAR installation with switch -s to skip all questions and use default settings. In general, this approach (if offered) is preferable compared to the automation of a Setup-GUI via Send commands. Sending ENTER commands only works, if the GUI offers simple pre-selected OK/YES/CONFIRM buttons. In more sophisticated Setups, checkboxes have to be set, options have to be selected, and possibly even user data have to be entered. Last but not least, some Setups may expect a reboot of the computer. As you can see, there are a variety of scenarios where the "Send ENTER approach" most likely cannot be implemented in a practical way. First of all I would make a list of the really important programs and check, which ones provide a SILENT option. Afterwards I would collect the syntax of the command line parameters for the respective programs. JesimomJR 1 "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
abberration Posted July 15, 2022 Share Posted July 15, 2022 Hello, To achieve completely silent installs, you should use silent switches, as Musashi said. The silent switch for WinRAR is "/S" (I think this one needs to be capitalized). The code for your example should be: Run("C:\INSTALADORES\winrar-x64-611br.exe /S") My signature has a link to a project I created called Software Installer. Even if you do not use my program to install software, you can use it to help determine what the silent switch might be. Also, there is a program called Universal Silent Switch Finder that might also be useful. JesimomJR and Musashi 2 Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
JesimomJR Posted July 15, 2022 Author Share Posted July 15, 2022 12 hours ago, Musashi said: Infelizmente sua pergunta não é fácil de responder ( quais programas você considera necessários ? ). Muitos programas oferecem uma instalação silenciosa ( Palavras-chave : Modo silencioso ou silencioso, /q , /s , -q, -s etc. ). As configurações desejadas são passadas por meio de parâmetros de linha de comando. A quantidade e complexidade desses parâmetros depende do respectivo software. Exemplo: WinRAR (de: https://documentation.help/WinRAR/HELPhints.htm ) Revelar conteúdos ocultos Como instalar o WinRAR no modo silencioso Se você precisar instalar o WinRAR em um grande número de computadores, pode ser chato responder às perguntas de configuração repetidas vezes. Nesse caso, você pode executar a instalação do WinRAR com o switch -s para pular todas as perguntas e usar as configurações padrão. Em geral, essa abordagem (se oferecida) é preferível em comparação com a automação de um Setup-GUI por meio de comandos Send . O envio de comandos ENTER só funciona se a GUI oferecer botões OK/YES/CONFIRM simples pré-selecionados. Em configurações mais sofisticadas, as caixas de seleção devem ser definidas, as opções devem ser selecionadas e, possivelmente, até mesmo os dados do usuário devem ser inseridos. Por último, mas não menos importante, algumas configurações podem esperar uma reinicialização do computador. Como você pode ver, há uma variedade de cenários em que a abordagem "Enviar ENTER " provavelmente não pode ser implementada de maneira prática. Antes de tudo, eu faria uma lista dos programas realmente importantes e verificaria quais oferecem uma opção SILENCIOSA. Depois eu coletaria a sintaxe dos parâmetros da linha de comando para os respectivos programas. Thanks for the feedback. To answer your question, all programs that are part of the script are really necessary. Installing winrar was just an example of how automation works. To switch between installation screens, I substituted Send("{ENTER}") to Send("!n") or other button that is responsible for advancing the screen. My question is whether there is any command in AutoIt, capable of completely hiding the installation and showing only on the tray, a balloon informing which program is being installed. Link to comment Share on other sites More sharing options...
JesimomJR Posted July 15, 2022 Author Share Posted July 15, 2022 10 hours ago, abberration said: Hello, To achieve completely silent installs, you should use silent switches, as Musashi said. The silent switch for WinRAR is "/S" (I think this one needs to be capitalized). The code for your example should be: Run("C:\INSTALADORES\winrar-x64-611br.exe /S") My signature has a link to a project I created called Software Installer. Even if you do not use my program to install software, you can use it to help determine what the silent switch might be. Also, there is a program called Universal Silent Switch Finder that might also be useful. Thanks for your response. Does the "/S" parameter work for all installation types? I tested it with winrar and it worked. Can I use it with other programs? Link to comment Share on other sites More sharing options...
Developers Jos Posted July 15, 2022 Developers Share Posted July 15, 2022 1 hour ago, JesimomJR said: Does the "/S" parameter work for all installation types? Is your search broken on your computer? ... and please do not quote full posts constantly (and no translated text) ... Thanks JesimomJR 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
JesimomJR Posted July 15, 2022 Author Share Posted July 15, 2022 2 hours ago, Jos said: não cite posts completos constantemente (e nenhum texto traduzido) ... Obrigado Sorry, I'm new here on the forum. I'm from Brazil, and I'm using Google Translate to help me. I'm still understanding how things work. I couldn't do the other installations using the "/S" parameter. This only worked with WinRAR. Can someone help me to install the other programs silently, without showing any windows? Link to comment Share on other sites More sharing options...
Musashi Posted July 15, 2022 Share Posted July 15, 2022 3 hours ago, JesimomJR said: Does the "/S" parameter work for all installation types? No ! /S is a common parameter for silent installations, but there are others as well. It depends, as I wrote before, on the particular software. Search with Google e.g. for : [name of the software] "Silent installation" or "unattended installation". You should also take a look at the nice project from @abberration (see his post above). There you will find e.g. details for popular programs (in the file installer.db). A very simple example : expandcollapse popup#include <AutoItConstants.au3> ; ==> just a very simple simulation :) Global $sSoftwareName Global $sSoftwareParams ; string with the required parameters Global $sErrorLog = "" ; Install Program 1 : ; ------------------- $sSoftwareName = "Setup1.exe" $sSoftwareParams = " /S" ToolTip("Install " & $sSoftwareName, 0, 0, "My Installer", $TIP_INFOICON) Sleep(3000) ; *** give tooltip time to display in this simulation ; => Run ... If @error Then ToolTip("Error installing " & $sSoftwareName, 0, 0, "My Installer", $TIP_ERRORICON) $sErrorLog &= "Error installing " & $sSoftwareName & @CRLF Sleep(3000) Else ToolTip("Installation successfull : " & $sSoftwareName, 0, 0, "My Installer", $TIP_INFOICON) Sleep(3000) EndIf ; Install Program 2 : ; ------------------- $sSoftwareName = "Setup2.exe" $sSoftwareParams = " /S" ToolTip("Install " & $sSoftwareName, 0, 0, "My Installer", $TIP_INFOICON) Sleep(3000) ; *** give tooltip time to display in this simulation ; => Run ... If @error Then ToolTip("Error installing " & $sSoftwareName, 0, 0, "My Installer", $TIP_ERRORICON) $sErrorLog &= "Error installing " & $sSoftwareName & @CRLF Sleep(3000) Else ToolTip("Installation successfull : " & $sSoftwareName, 0, 0, "My Installer", $TIP_INFOICON) Sleep(3000) EndIf ; [...] ConsoleWrite($sErrorLog & @CRLF) "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
Musashi Posted July 15, 2022 Share Posted July 15, 2022 8 minutes ago, JesimomJR said: Can someone help me to install the other programs silently, without showing any windows? Our last posts overlapped . Regarding the parameters, see my last post. Use Run with the show_flag @SW_HIDE. Just out of curiosity : Why does it bother you when a setup shows e.g. a progress bar (some setups do this in unattended mode). As long as no actions by the user are required, something like this is rather helpful after all. "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
Developers Jos Posted July 15, 2022 Developers Share Posted July 15, 2022 35 minutes ago, JesimomJR said: and I'm using Google Translate to help me. .. and that is fine, but do not put the translated Portuguese text in a quote in your answer! just leave that out! SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
JesimomJR Posted July 15, 2022 Author Share Posted July 15, 2022 1 hour ago, Musashi said: Use Run with the show_flag @SW_HIDE. I've tried running the script this way, but it's still visible. Link to comment Share on other sites More sharing options...
JesimomJR Posted July 15, 2022 Author Share Posted July 15, 2022 1 hour ago, Musashi said: expandcollapsepopup expandcollapse popup#include <AutoItConstants.au3> ; ==> just a very simple simulation :) Global $sSoftwareName Global $sSoftwareParams ; string with the required parameters Global $sErrorLog = "" ; Install Program 1 : ; ------------------- $sSoftwareName = "Setup1.exe" $sSoftwareParams = " /S" ToolTip("Install " & $sSoftwareName, 0, 0, "My Installer", $TIP_INFOICON) Sleep(3000) ; *** give tooltip time to display in this simulation ; => Run ... If @error Then ToolTip("Error installing " & $sSoftwareName, 0, 0, "My Installer", $TIP_ERRORICON) $sErrorLog &= "Error installing " & $sSoftwareName & @CRLF Sleep(3000) Else ToolTip("Installation successfull : " & $sSoftwareName, 0, 0, "My Installer", $TIP_INFOICON) Sleep(3000) EndIf ; Install Program 2 : ; ------------------- $sSoftwareName = "Setup2.exe" $sSoftwareParams = " /S" ToolTip("Install " & $sSoftwareName, 0, 0, "My Installer", $TIP_INFOICON) Sleep(3000) ; *** give tooltip time to display in this simulation ; => Run ... If @error Then ToolTip("Error installing " & $sSoftwareName, 0, 0, "My Installer", $TIP_ERRORICON) $sErrorLog &= "Error installing " & $sSoftwareName & @CRLF Sleep(3000) Else ToolTip("Installation successfull : " & $sSoftwareName, 0, 0, "My Installer", $TIP_INFOICON) Sleep(3000) EndIf ; [...] ConsoleWrite($sErrorLog & @CRLF) Thanks for the help, but since I'm very new to AutoIt, this script got a little complex to understand. I'm just looking for something simple where I can hide the window and stealthily install the program by clicking the forward buttons. My script is now ready. I can now install all the programs. I just can't hide them from the screen. Link to comment Share on other sites More sharing options...
Musashi Posted July 15, 2022 Share Posted July 15, 2022 (edited) 17 minutes ago, JesimomJR said: My script is now ready. I can now install all the programs. I just can't hide them from the screen. Could you please post your script, so that we can have a look. Edit : @JesimomJR I am a bit surprised that your script installs all programs, while my simple simulation is too complex for you . Edited July 15, 2022 by Musashi "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
JesimomJR Posted July 18, 2022 Author Share Posted July 18, 2022 On 15/07/2022 at 15:17, Musashi said: Você poderia postar seu script para que possamos dar uma olhada. Editar:@JesimomJR Estou um pouco surpreso que seu script instale todos os programas, enquanto minha simulação simples é muito complexa para você . Take a look, and see if you can help me, friend! Automatizar.au3 Link to comment Share on other sites More sharing options...
Developers Jos Posted July 18, 2022 Developers Share Posted July 18, 2022 (edited) @JesimomJR, this will be the last time I ask you nicely NOT to post any NONE ENGLISH text! ... and stop quoting the text when there is no need! The next time your post will simply be removed. Jos Edited July 18, 2022 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now