Skip to content

Commit

Permalink
1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
NickolajA committed Sep 29, 2020
1 parent e7ec79f commit 6b29e48
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Drivers/Invoke-HPDriverUpdate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,17 @@ Process {
$HPImageAssistantExecutablePath = Join-Path -Path $env:SystemRoot -ChildPath "Temp\HPIA\HPImageAssistant.exe"
switch ($HPIAAction) {
"Download" {
Write-LogEntry -Value "Attempting to execute HP Image Assistant to download drivers including driver software, this might take some time" -Severity 1

# Prepare arguments for HP Image Assistant download mode
$HPImageAssistantArguments = "/Operation:Analyze /Action:Download /Selection:All /Silent /Category:Drivers,Software /ReportFolder:$($HPImageAssistantReportPath) /SoftpaqDownloadFolder:$($SoftpaqDownloadPath)"

# Set HP Image Assistant operational mode in registry
Set-RegistryValue -Path "HKLM:\SOFTWARE\HP\ImageAssistant" -Name "OperationalMode" -Value "Download" -ErrorAction Stop
}
"Install" {
Write-LogEntry -Value "Attempting to execute HP Image Assistant to download and install drivers including driver software, this might take some time" -Severity 1

# Prepare arguments for HP Image Assistant download mode
$HPImageAssistantArguments = "/Operation:Analyze /Action:Install /Selection:All /Silent /Category:Drivers,Software /ReportFolder:$($HPImageAssistantReportPath) /SoftpaqDownloadFolder:$($SoftpaqDownloadPath)"

Expand All @@ -357,7 +361,7 @@ Process {
}
}

Write-LogEntry -Value "Attempting to execute HP Image Assistant to install drivers and driver software, this might take some time" -Severity 1
# Invoke HP Image Assistant
$Invocation = Invoke-Executable -FilePath $HPImageAssistantExecutablePath -Arguments $HPImageAssistantArguments -ErrorAction Stop

# Add a registry key for Win32 app detection rule based on HP Image Assistant exit code
Expand Down

0 comments on commit 6b29e48

Please sign in to comment.