mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Performance mode switching
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
log.txt
|
||||
18
autostart.ps1
Normal file
18
autostart.ps1
Normal 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
|
||||
BIN
g14-gpu.exe
BIN
g14-gpu.exe
Binary file not shown.
BIN
g14-helper.exe
Normal file
BIN
g14-helper.exe
Normal file
Binary file not shown.
2
ghelper-compile.ps1
Normal file
2
ghelper-compile.ps1
Normal 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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user