mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-18 13:33:31 +00:00
update base, inst
refactor get dll and exe path
This commit is contained in:
19
lib/inst.ps1
19
lib/inst.ps1
@@ -1,15 +1,8 @@
|
||||
Function Get_VBPath {
|
||||
@(
|
||||
'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall',
|
||||
'Registry::HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
|
||||
) | ForEach-Object {
|
||||
if(Test-Path -Path $_) {
|
||||
(Get-ChildItem -Path $_\*) | ForEach-Object {
|
||||
if($_.Name.Contains("Voicemeeter")) {
|
||||
$reg = -join("Registry::", $_.Name)
|
||||
return $(Get-ItemPropertyValue -Path $reg -Name UninstallString | Split-Path -Parent)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$reg_path = "Registry::HKEY_LOCAL_MACHINE\Software" + `
|
||||
(&{If([Environment]::Is64BitOperatingSystem) {"\WOW6432Node"} Else {""}}) + `
|
||||
"\Microsoft\Windows\CurrentVersion\Uninstall"
|
||||
$vm_key = "\VB:Voicemeeter {17359A74-1236-5467}\"
|
||||
|
||||
return $(Get-ItemPropertyValue -Path ($reg_path + $vm_key) -Name UninstallString | Split-Path -Parent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user