mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-18 13:33:31 +00:00
run through formatter
This commit is contained in:
22
lib/inst.ps1
22
lib/inst.ps1
@@ -1,19 +1,19 @@
|
||||
function Get_VMPath {
|
||||
$REG_KEY = @(
|
||||
"Registry::HKEY_LOCAL_MACHINE",
|
||||
"Software",
|
||||
(& { if ([Environment]::Is64BitOperatingSystem) { "WOW6432Node" } else { "" } }),
|
||||
"Microsoft",
|
||||
"Windows",
|
||||
"CurrentVersion",
|
||||
"Uninstall"
|
||||
).Where({ $_ -ne "" }) -Join "\"
|
||||
$VM_KEY = "VB:Voicemeeter {17359A74-1236-5467}"
|
||||
'Registry::HKEY_LOCAL_MACHINE',
|
||||
'Software',
|
||||
(& { if ([Environment]::Is64BitOperatingSystem) { 'WOW6432Node' } else { '' } }),
|
||||
'Microsoft',
|
||||
'Windows',
|
||||
'CurrentVersion',
|
||||
'Uninstall'
|
||||
).Where({ $_ -ne '' }) -Join '\'
|
||||
$VM_KEY = 'VB:Voicemeeter {17359A74-1236-5467}'
|
||||
|
||||
try {
|
||||
return $(Get-ItemPropertyValue -Path (@($REG_KEY, $VM_KEY) -Join "\") -Name UninstallString | Split-Path -Parent)
|
||||
return $(Get-ItemPropertyValue -Path (@($REG_KEY, $VM_KEY) -Join '\') -Name UninstallString | Split-Path -Parent)
|
||||
}
|
||||
catch {
|
||||
throw [VMRemoteError]::new("Unable to fetch Voicemeeter path from the Registry.")
|
||||
throw [VMRemoteError]::new('Unable to fetch Voicemeeter path from the Registry.')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user