diff --git a/redist/Install_Update_ViGEm.ps1 b/redist/Install_Update_ViGEm.ps1 index 3dc76da..6d28720 100644 --- a/redist/Install_Update_ViGEm.ps1 +++ b/redist/Install_Update_ViGEm.ps1 @@ -7,17 +7,20 @@ Break Return } +if (get-module | Where-Object {$_.Name -eq "ViGEmManagementModule"}) +{ + + if (Get-ViGEmBusDevice) + { + Get-ViGEmBusDevice | Remove-ViGEmBusDevice + } + +} else { + Register-PSRepository -Name nuget.vigem.org -SourceLocation https://nuget.vigem.org/ -InstallationPolicy Trusted + + Install-Module ViGEmManagementModule -Repository nuget.vigem.org +} -#Remove multiple just in case... -Get-ViGEmBusDevice | Remove-ViGEmBusDevice -Get-ViGEmBusDevice | Remove-ViGEmBusDevice -Get-ViGEmBusDevice | Remove-ViGEmBusDevice -Get-ViGEmBusDevice | Remove-ViGEmBusDevice - - -Register-PSRepository -Name nuget.vigem.org -SourceLocation https://nuget.vigem.org/ -InstallationPolicy Trusted -confirm:$false - -Install-Module ViGEmManagementModule -Repository nuget.vigem.org Install-ViGEmBusDeviceDriver