question

windows0583-8703 avatar image
0 Votes"
windows0583-8703 asked LimitlessTechnology-2700 answered

Powershell script for Executable

Hello,

Can someone advise me on what to do?
I am trying to write a Powershell script that will install an executable on the computer.
However, when the install window pops up there are 3 things I need to do:

  1. Check the box that says: "I accept the license agreement and privacy notice"

  2. Input the Licenses Key

  3. Click on Install

Is there a way in powershell to accomplish this so there is no user input?

I read on Microsoft that Powershell does not support License Acceptance

Is that correct?






windows-server-powershell
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

This has nothing to do with Powershell. Whatever executable you are running should accept command line switches to accept the license key and proceed with the install if it supports unattended installations.

I read on Microsoft that Powershell does not support License Acceptance

Powershell is just a scripting language. It runs commands and programs. So if the .exe you are running does not implement unattended install switches, it doesn't matter if it's a .ps1 script executed by Powershell or a .bat file executed by cmd.exe, if the installation program expects a user to "click on agree", that's not a Powershell problem.

Ask the vendor how to implement unattended installations..

1 Vote 1 ·
LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hello

Thank you for your question and reaching out.

Try these switches, individually and combination, or else open the MSI with Orca and change the EULA variable.

ACCEPT=YES
ACCEPTEULA=1
ASSOCIATE=1


Command-line switches have to be used when calling the executable. They are bound to that application. Just entering /accepteula on the command line is an error because there's no context, nothing to accept the switch.

yourprogram.exe /accepteula


Example : Setup.exe /v"/l*v c:\test.log" /v"MYPROPERTY1=value1" /v"/qb"



--If the reply is helpful, please Upvote and Accept as answer--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

EstagiarioCabulaNTI-4430 avatar image
0 Votes"
EstagiarioCabulaNTI-4430 answered EstagiarioCabulaNTI-4430 commented

Indico você abrir o .exe com o WinRAR e utilizar a instalação silenciosa de acordo com os arquivos que estão dentro deste .exe, se dentro do .exe houver um programa de extensão .msi, então você pode desmembrar ele e criar um script usando a função silenciar do .msi

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The user has said nothing about using WinRAR.

0 Votes 0 ·

Eu dei uma alternativa para ela, para abrir um arquivo .EXE e verificar os arquivos e tentar fazer um script silencioso de acordo com os itens internos. Fiz isso para uma instalação do SMART da empresa PIXEON, onde eu removi o passo de NEXT e Concluir da instalação, ou seja, a instalação ficou sem precisar da interação do usuário

0 Votes 0 ·