forked from ge9/IddSampleDriver
-
-
Notifications
You must be signed in to change notification settings - Fork 366
Expand file tree
/
Copy pathprimary-VDD.ps1
More file actions
15 lines (12 loc) · 747 Bytes
/
primary-VDD.ps1
File metadata and controls
15 lines (12 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 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
}
}
# Install dependencies if required
. "$PSScriptRoot\set-dependencies.ps1"
$disp = Get-DisplayInfo | Where-Object { $_.DisplayName -eq "VDD by MTT" }
Set-DisplayPrimary -DisplayId $disp.DisplayId