Wie können wir helfen?

Create HpHSA Services Sript

Du bist hier:
< Alle Themen

## This Script create HP Services

## By removing the hpbloatware, was removed this service to

## By removing this Services, we have Problem with Hotkey Funktions.

# F1 and F9 was not working!!.Recreating this Services solved the Problem..

## 29.07.2025

# Created by albitori

# Install Driver Data for Hotkey Support

# Only for Driver installation with *.inf Files

# Path for the Log files

$logs = „C:\windows\Logs\inshotkeydrv.log“

# Install Drivers

Get-ChildItem -Path $PSScriptRoot -Recurse | Where-Object -Property Extension -EQ „.inf“ |

ForEach-Object { PNPUtil.exe /add-driver $_.FullName /install } | Out-File -FilePath $logs -Force | Out-Null

###Install now the Services

# Create „HP App Helper HSA Service“

New-Service -Name HPAppHelperCap -BinaryPathName „C:\WINDOWS\System32\DriverStore\FileRepository\hpcustomcapcomp.inf_amd64_2597bd51148d0b54\x64\AppHelperCap.exe“  -DisplayName „HP App Helper HSA Service“ -StartupType Automatic -DependsOn rpcss,ProfSvc

# Create „HP Diagnostics HSA Service“

New-Service -Name HPDiagsCap -BinaryPathName „C:\WINDOWS\System32\DriverStore\FileRepository\hpcustomcapcomp.inf_amd64_2597bd51148d0b54\x64\DiagsCap.exe“  -DisplayName „HP Diagnostics HSA Service“ -StartupType Automatic -DependsOn rpcss,ProfSvc

# Create „HP System Info HSA Service“

New-Service -Name HPSysInfoCap -BinaryPathName „C:\WINDOWS\System32\DriverStore\FileRepository\hpcustomcapcomp.inf_amd64_2597bd51148d0b54\x64\SysInfoCap.exe“  -DisplayName „HP System Info HSA Service“ -StartupType Automatic -DependsOn rpcss,ProfSvc

#Check if Registry Value exist and write (rewrite) registry value

$regPath = „HKLM:SYSTEM\HP“

$Name = „Hotkey“

$value = „1“

$Name2 = „HpHSA-Service“

$value2 = „1“

If(!(Test-Path $regPath))

{

New-Item -Path $regPath -Force | Out-Null

New-ItemProperty -Path $RegPath -Name $Name -Value $value -PropertyType String -Force | Out-Null}

ELSE{

New-ItemProperty -Path $regPath -Name $Name -Value $value -PropertyType String -Force | Out-Null}

# Write HSA Service Creation Reg Value

If(!(Test-Path $regPath))

{

New-Item -Path $regPath -Force | Out-Null

New-ItemProperty -Path $RegPath -Name $Name2 -Value $value2 -PropertyType String -Force | Out-Null}

ELSE{

New-ItemProperty -Path $regPath -Name $Name2 -Value $value2 -PropertyType String -Force | Out-Null}

Inhaltsverzeichnis