Powershell install Java silently -
i need install new java update silently. have these arguments installation:
install_silent=1 static=0 auto_update=0 web_java=1 web_java_security_level=h web_analytics=0 eula=0 reboot=0 nostartmenu=0 sponsors=0
and tried:
start-process -wait '\\srv\netlogon\java\jre-8u45-windows-i586.exe' -argumentlist '/s install_silent=1 static=0 auto_update=0 web_java=1 web_java_security_level=h web_analytics=0 eula=0 reboot=0 nostartmenu=0 sponsors=0'
and also:
$arguments = @( '/s', "/v/qn `"install_silent=1 static=0 auto_update=0 web_java=1 web_java_security_level=h web_analytics=0 eula=0 reboot=0 nostartmenu=0 sponsors=0 /l \`"c:\temp\java_install.log\`"`"" ) $proc = start-process "\\srv\netlogon\java\jre-8u45-windows-i586.exe" -argumentlist $arguments -wait -passthru if($proc.exitcode -ne 0) { throw "error" }
and both version has prompt dialog. how install silently?
i found solution in cmdlet execute-process
via script. works fine!
and calling it:
execute-process '\\srv\java\jre-8u45-windows-x64.exe' -arguments '/s install_silent=1 static=0 auto_update=0 web_java=1 web_java_security_level=h web_analytics=0 eula=0 reboot=0 nostartmenu=0 sponsors=0 /l c:\temp\jre-8u45-windows-x64.log'
Comments
Post a Comment