2023-08-12 01:40:29 +01:00
|
|
|
function Get_VMPath {
|
2023-08-16 02:52:12 +01:00
|
|
|
$REG_KEY = "Registry::HKEY_LOCAL_MACHINE\Software" + `
|
2022-10-27 21:20:03 +01:00
|
|
|
(& { if ([Environment]::Is64BitOperatingSystem) { "\WOW6432Node" } else { "" } }) + `
|
2022-06-25 15:20:36 +01:00
|
|
|
"\Microsoft\Windows\CurrentVersion\Uninstall"
|
2023-08-16 02:52:12 +01:00
|
|
|
$VM_KEY = "\VB:Voicemeeter {17359A74-1236-5467}\"
|
2022-01-08 16:07:02 +00:00
|
|
|
|
2023-08-16 02:52:12 +01:00
|
|
|
try {
|
|
|
|
return $(Get-ItemPropertyValue -Path ($REG_KEY + $VM_KEY) -Name UninstallString | Split-Path -Parent)
|
|
|
|
}
|
|
|
|
catch {
|
2023-08-16 16:36:43 +01:00
|
|
|
throw [VMRemoteError]::new("Unable to fetch Voicemeeter path from the Registry.")
|
2023-08-16 02:52:12 +01:00
|
|
|
}
|
2021-05-04 17:29:38 +01:00
|
|
|
}
|