mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 21:15:38 +02:00
set high dpi aware in powershell script instead
This commit is contained in:
parent
cb9e0c8216
commit
4d4e11ce5e
2 changed files with 5 additions and 4 deletions
|
@ -1,2 +0,0 @@
|
|||
REG ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V "%~dp0PersistentWindows.exe" /T REG_SZ /D "~ HIGHDPIAWARE" /F
|
||||
start "" /B "%~dp0PersistentWindows.exe" %*
|
|
@ -1,6 +1,11 @@
|
|||
## Replace with your desired command arguments
|
||||
$arguments = "-splash=0"
|
||||
|
||||
$executablePath = $PSScriptRoot + "\PersistentWindows.exe"
|
||||
|
||||
## create registry to run PersistentWindows.exe in high dpi aware mode
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" -Name $executablePath -Value "~ HIGHDPIAWARE"
|
||||
|
||||
## rename the task as you like
|
||||
$taskName = "StartPersistentWindows" + $env:username
|
||||
$taskDescription = "This task starts automatically when " + $env:username + " login."
|
||||
|
@ -12,8 +17,6 @@ if ($existingTask -ne $null) {
|
|||
Unregister-ScheduledTask -TaskName $taskName -Confirm:$false
|
||||
}
|
||||
|
||||
$executablePath = $PSScriptRoot + "\PersistentWindows.bat"
|
||||
|
||||
$action = New-ScheduledTaskAction -Execute $executablePath
|
||||
$trigger = New-ScheduledTaskTrigger -AtLogOn -User $env:username
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue