refactor: scipt and request

This commit is contained in:
手瓜一十雪
2024-05-14 10:16:30 +08:00
parent 00a8715e58
commit 93cb662282
4 changed files with 14 additions and 11 deletions

View File

@@ -2,7 +2,6 @@ function Get-QQpath {
try {
$key = Get-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ"
$uninstallString = $key.UninstallString
throw "get QQ path error:"
return [System.IO.Path]::GetDirectoryName($uninstallString) + "\QQ.exe"
} catch {
throw "get QQ path error: $_"

View File

@@ -2,7 +2,6 @@ function Get-QQpath {
try {
$key = Get-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ"
$uninstallString = $key.UninstallString
throw "get QQ path error:"
return [System.IO.Path]::GetDirectoryName($uninstallString) + "\QQ.exe"
} catch {
throw "get QQ path error: $_"