mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Minor tweaks and cleanup
This commit is contained in:
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
@@ -20,6 +20,7 @@ jobs:
|
||||
run: |
|
||||
mkdir release
|
||||
cp *.exe ./release
|
||||
cp ghelper.ps1 ./release
|
||||
zip -r g14-helper.zip ./release
|
||||
|
||||
- name: Release
|
||||
|
||||
@@ -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
|
||||
BIN
g14-helper.exe
BIN
g14-helper.exe
Binary file not shown.
@@ -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
|
||||
@@ -190,8 +190,8 @@ $icon_ultimate = [Drawing.Icon][IO.MemoryStream][Convert]::FromBase64String("AAA
|
||||
|
||||
# Init Config and Log
|
||||
$ghelper_app_path = "$($env:LOCALAPPDATA)\GHelper"
|
||||
$ghelper_config_path = "$($env:LOCALAPPDATA)\GHelper\config.json"
|
||||
$ghelper_log_path = "$($env:LOCALAPPDATA)\GHelper\log.txt"
|
||||
$ghelper_config_path = "$ghelper_app_path\config.json"
|
||||
$ghelper_log_path = "$ghelper_app_path\log.txt"
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $ghelper_app_path
|
||||
|
||||
Reference in New Issue
Block a user