mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-18 05:10:48 +00:00
onyx-and-iris
9b3d9f2250
Allow them to bubble up. (Might be worth adding a helper function to print stacktrace?)
14 lines
516 B
PowerShell
14 lines
516 B
PowerShell
function Get_VMPath {
|
|
$REG_KEY = "Registry::HKEY_LOCAL_MACHINE\Software" + `
|
|
(& { if ([Environment]::Is64BitOperatingSystem) { "\WOW6432Node" } else { "" } }) + `
|
|
"\Microsoft\Windows\CurrentVersion\Uninstall"
|
|
$VM_KEY = "\VB:Voicemeeter {17359A74-1236-5467}\"
|
|
|
|
try {
|
|
return $(Get-ItemPropertyValue -Path ($REG_KEY + $VM_KEY) -Name UninstallString | Split-Path -Parent)
|
|
}
|
|
catch {
|
|
throw [VMRemoteError]::new("Unable to fetch Voicemeeter path from the Registry.")
|
|
}
|
|
}
|