mirror of
https://github.com/VirtualDrivers/Virtual-Display-Driver.git
synced 2026-10-21 22:22:27 -05:00
Don't remember if this is for which manufacture name theses were, but if you know powershell you can easily changge the lnx000 to mttvdd or vice versa (this info is from memory, been awhile since i did the scripts)
36 lines
1.5 KiB
PowerShell
36 lines
1.5 KiB
PowerShell
# Self-elevate the script if required
|
|
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
|
|
if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
|
|
$CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
|
|
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
|
|
Exit
|
|
}
|
|
}
|
|
|
|
$repoName = "PSGallery"
|
|
$moduleName1 = "DisplayConfig"
|
|
$moduleName2 = "MonitorConfig"
|
|
if (!(Get-PSRepository -Name $repoName) -OR !(Find-Module -Name $moduleName1 | Where-Object {$_.Name -eq $moduleName1}) -OR !(Find-Module -Name $moduleName2 | Where-Object {$_.Name -eq $moduleName2})) {
|
|
& .\dep_fix.ps1
|
|
}
|
|
|
|
|
|
# Import the local module
|
|
$dpth = Get-Module -ListAvailable $moduleName1 | select path | Select-Object -ExpandProperty path
|
|
import-module -name $dpth -InformationAction:Ignore -Verbose:$false -WarningAction:SilentlyContinue -Confirm:$false
|
|
|
|
# Import the other localmodule
|
|
$mpth = Get-Module -ListAvailable $moduleName2 | select path | Select-Object -ExpandProperty path
|
|
import-module -name $mpth -InformationAction:Ignore -Verbose:$false -WarningAction:SilentlyContinue -Confirm:$false
|
|
|
|
|
|
$profi = Get-DisplayProfile
|
|
|
|
if ( $profi -eq "Extend" ) {
|
|
Set-DisplayProfile Clone
|
|
break
|
|
}
|
|
if ( $profi -eq "Clone" ) {
|
|
Set-DisplayProfile Extend
|
|
break
|
|
} |