Silent install with Powershell.
Hi,
I'm trying to make a silent install of a AMD driver with Powershell, but for some reason, I always get the AMD installation screen.
My arguments seem to be all right because I do not have to click anywhere and the installation completes by itself.
Is there any way to install it without any windows poping up? I can install 7zip silently the same way without any problem.
I am using the following Powershell code:
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
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
kalucas
7 years ago
You didn't say what version of Windows you are using. I ran into this recently with a driver install in Windows 7 for another product. How is the driver signed? If using a SHA256 or higher certificate, you will need to install a couple of hotfixes prior to installing your driver:
This one removes the Untrusted Publisher dialog box you may be seeing:
This one adds support for SHA-2 Code Signing Support for Windows 7 and Server 2008 R2:
https://technet.microsoft.com/en-us/library/security/3033929
Posted by:
Portafreak
7 years ago