Minor tweaks and cleanup

This commit is contained in:
seerge
2023-02-14 11:47:17 +01:00
parent fb4a0cf3db
commit c9e25b6358
5 changed files with 4 additions and 21 deletions

View File

@@ -20,6 +20,7 @@ jobs:
run: | run: |
mkdir release mkdir release
cp *.exe ./release cp *.exe ./release
cp ghelper.ps1 ./release
zip -r g14-helper.zip ./release zip -r g14-helper.zip ./release
- name: Release - name: Release

View File

@@ -1,18 +0,0 @@
$taskName = "G14Helper"
$task = Get-ScheduledTask -TaskName $taskName -ErrorAction SilentlyContinue
if ($null -ne $task)
{
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.

View File

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

View File

@@ -190,8 +190,8 @@ $icon_ultimate = [Drawing.Icon][IO.MemoryStream][Convert]::FromBase64String("AAA
# Init Config and Log # Init Config and Log
$ghelper_app_path = "$($env:LOCALAPPDATA)\GHelper" $ghelper_app_path = "$($env:LOCALAPPDATA)\GHelper"
$ghelper_config_path = "$($env:LOCALAPPDATA)\GHelper\config.json" $ghelper_config_path = "$ghelper_app_path\config.json"
$ghelper_log_path = "$($env:LOCALAPPDATA)\GHelper\log.txt" $ghelper_log_path = "$ghelper_app_path\log.txt"
New-Item -ItemType Directory -Force -Path $ghelper_app_path New-Item -ItemType Directory -Force -Path $ghelper_app_path