Performance mode switching

This commit is contained in:
Serge
2023-02-12 21:12:02 +01:00
parent 7744f2d947
commit 04a7d845af
8 changed files with 287 additions and 127 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
log.txt

18
autostart.ps1 Normal file
View File

@@ -0,0 +1,18 @@
$taskName = "G14Helper"
$task = Get-ScheduledTask -TaskName $taskName -ErrorAction SilentlyContinue
if ($task -ne $null)
{
Unregister-ScheduledTask -TaskName $taskName -Confirm:$false
}
$scriptDir = Split-Path $PSCommandPath -Parent
# TODO: EDIT THIS STUFF AS NEEDED...
$action = New-ScheduledTaskAction -Execute "$scriptDir\g14-helper.exe"
$trigger = New-ScheduledTaskTrigger -AtLogon
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
$principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$definition = New-ScheduledTask -Action $action -Principal $principal -Trigger $trigger -Settings $settings -Description "Run $($taskName) at Logon"
Register-ScheduledTask -TaskName $taskName -InputObject $definition

Binary file not shown.

BIN
g14-helper.exe Normal file

Binary file not shown.

2
ghelper-compile.ps1 Normal file
View File

@@ -0,0 +1,2 @@
ps2exe .\gpu.ps1 g14-helper.exe -title 'G14 Helper' -DPIAware -winFormsDPIAware -requireAdmin -iconFile 'standard.ico' -noConsole -copyright 'G14 Helper Tool' -noOutput
.\g14-helper.exe

View File

@@ -1,2 +0,0 @@
ps2exe .\gpu.ps1 g14-gpu.exe -title 'G14 GPU Mode' -DPIAware -winFormsDPIAware -requireAdmin -iconFile 'standard.ico' -noConsole -copyright 'G14 GPU Mode'
.\g14-gpu.exe

391
gpu.ps1

File diff suppressed because one or more lines are too long