0
votes

I'm trying to make a silent install of an AMD driver with Powershell, but for some reason, I always get the AMD installation screen. My arguments seem to be ok because I do not have to click anywhere and the installation completes by itself.Is there any way to install it without any windows popping up? I can install 7zip silently the same way without any problem.

Set-ExecutionPolicy Unrestricted
$Logpath = 'C:\powershell.log'

function Install_app

{

$exe_to_execute = 'C:\Setup.exe'
$argument  = '/unattended_install:"..\Packages\Drivers\Display\W76A_INF;..\Packages\Drivers\amdkmpfd\W764a;..\Packages\Apps\ACP64;..\Packages\Apps\AppEx;..\Packages\Apps\CCC2;..\Packages\Apps\CIM;..\Packages\Apps\VC12RTx64\" /autoaccept_all /force_hide_first_run /force_close_when_done /on_reboot_message:no'

$process = Start-Process  -FilePath $exe_to_execute  -ArgumentList $argument  -Wait -PassThru -NoNewWindow 

# Loop until process exits
do {start-sleep -Milliseconds 500}
until ($process.HasExited)
# Log results
$(Get-Date).ToString() + "  Exit code " + $process.ExitCode |  Out-File $Logpath -Append 

}


Install_app
1
You're passing your arguments incorrectly for one. Second, use the -Wait switch. - Maximilian Burszley
I'm already using the wait switch and what makes you think I am passing my arguments incorrectly? - Portafreak
Because you are? Try passing each argument as its own entry in an array (as it's designed to be) and stop using relative paths. - Maximilian Burszley
Are these Power Shell arguments, or arguments for the installer? - YetAnotherRandomUser
It's the AMD driver arguments. I have also tried with an array without success. - Portafreak

1 Answers

0
votes

My script is in fact actually working as it is. The problem is that it will only hide all setup windows if run under the system account.