From 30552dd38cd0e835b59dc42d84d5d0d30f19287f Mon Sep 17 00:00:00 2001
From: SaltSpectre <200460916+SaltSpectre@users.noreply.github.com>
Date: Tue, 20 Jan 2026 16:36:22 -0500
Subject: [PATCH 1/6] fix(app): Enhance logging for installation and
uninstallation processes
---
app_handler.ps1 | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/app_handler.ps1 b/app_handler.ps1
index 78c1ff1..b8fa55e 100644
--- a/app_handler.ps1
+++ b/app_handler.ps1
@@ -68,9 +68,11 @@ Function Install-skHost {
if ($AutoStart) {
if (Test-RegistryValue "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" "skHost") {
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "skHost" -Force -Confirm:$false
+ Write-skSessionLog -Message "ℹ️ Removed existing autostart registry entry for skHost." -Type "INFO" -Color Cyan
}
# Specify to use conhost in case Windows Terminal is set as default as it does not support WindowStyle Hidden like conhost
- New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "skHost" -PropertyType String -Value "conhost powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$InstallPath\skhost.ps1`"" -Force -Confirm:$false
+ New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "skHost" -PropertyType String -Value "conhost powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$InstallPath\skhost.ps1`"" -Force -Confirm:$false | Out-Null
+ Write-skSessionLog -Message "✔️ Created autostart registry entry for skHost." -Type "SUCCESS" -Color Green
}
# Create Start Menu Shortcut
@@ -88,6 +90,7 @@ Function Install-skHost {
$Shortcut.IconLocation = "$env:SystemRoot\system32\shell32.dll,43"
}
$Shortcut.Save()
+ Write-skSessionLog -Message "✔️ Created Start Menu shortcut for skHost." -Type "SUCCESS" -Color Green
}
Function Uninstall-skHost {
@@ -95,18 +98,23 @@ Function Uninstall-skHost {
$NewInstallPath = "$env:LOCALAPPDATA\SaltSpectre\ps-skhost"
if (Test-Path $NewInstallPath) {
Remove-Item -Path $NewInstallPath -Recurse -Force -Confirm:$false -ErrorAction SilentlyContinue
- Write-skSessionLog -Message "Removed: $NewInstallPath" -Type "SUCCESS" -Color Green
+ Write-skSessionLog -Message "✔️ Removed: $NewInstallPath" -Type "SUCCESS" -Color Green
}
# Clean up old installation files (backward compatibility)
Remove-Item -Path "$env:LOCALAPPDATA\skHost.ps1" -Force -Confirm:$false -ErrorAction SilentlyContinue
+ Write-skSessionLog -Message "✔️ Removed old installation file: $env:LOCALAPPDATA\skHost.ps1" -Type "SUCCESS" -Color Green
foreach ($format in @('ico', 'png', 'bmp')) {
Remove-Item -Path "$env:LOCALAPPDATA\skHost.$format" -Force -Confirm:$false -ErrorAction SilentlyContinue
+ Write-skSessionLog -Message "✔️ Removed old installation icon file: $env:LOCALAPPDATA\skHost.$format" -Type "SUCCESS" -Color Green
}
# Remove shared components
Remove-Item -Path "$env:APPDATA\Microsoft\Windows\Start Menu\skHost.lnk" -Force -Confirm:$false -ErrorAction SilentlyContinue
+ Write-skSessionLog -Message "✔️ Removed Start Menu shortcut: $env:APPDATA\Microsoft\Windows\Start Menu\skHost.lnk" -Type "SUCCESS" -Color Green
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "skHost" -Force -Confirm:$false -ErrorAction SilentlyContinue
+ Write-skSessionLog -Message "✔️ Removed autostart registry entry for skHost." -Type "SUCCESS" -Color Green
- Write-skSessionLog -Message "Uninstall completed." -Type "SUCCESS" -Color Green
+ Write-skSessionLog -Message "✔️ Uninstall completed." -Type "SUCCESS" -Color Green
+ Remove-Item $SESSION_LOG -Force -Confirm:$false -ErrorAction SilentlyContinue
}
From 6bcf8e32fa6f4b24f3ee23808c5c7b1a99080631 Mon Sep 17 00:00:00 2001
From: SaltSpectre <200460916+SaltSpectre@users.noreply.github.com>
Date: Tue, 20 Jan 2026 16:39:22 -0500
Subject: [PATCH 2/6] fix(manifest): Add LICENSE and README.md to the manifest
file
---
manifest.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/manifest.txt b/manifest.txt
index 1db0aa7..36849dc 100644
--- a/manifest.txt
+++ b/manifest.txt
@@ -7,4 +7,6 @@ manifest.txt
version.txt
log.ps1
app_handler.ps1
-icon_handler.ps1
\ No newline at end of file
+icon_handler.ps1
+LICENSE
+README.md
\ No newline at end of file
From 9f3487b3b24cc8ef43ef16e9815170ff51356bbb Mon Sep 17 00:00:00 2001
From: SaltSpectre <200460916+SaltSpectre@users.noreply.github.com>
Date: Tue, 20 Jan 2026 16:58:12 -0500
Subject: [PATCH 3/6] feat(wix): Implement build and packaging workflow for
Windows Installer and ZIP archive
---
.github/workflows/build-release.yml | 103 +++++++++++++++++-----
version.txt | 2 +-
wix/License.rtf | 12 +++
wix/Product.wxs | 131 ++++++++++++++++++++++++++++
wix/skHost.wixproj | 28 ++++++
5 files changed, 255 insertions(+), 21 deletions(-)
create mode 100644 wix/License.rtf
create mode 100644 wix/Product.wxs
create mode 100644 wix/skHost.wixproj
diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml
index 8808e29..5e104af 100644
--- a/.github/workflows/build-release.yml
+++ b/.github/workflows/build-release.yml
@@ -10,8 +10,8 @@ permissions:
contents: write
jobs:
- build-zip:
- runs-on: ubuntu-latest
+ build-packages:
+ runs-on: windows-latest
outputs:
version: ${{ steps.version.outputs.VERSION }}
tag: ${{ steps.version.outputs.TAG }}
@@ -22,32 +22,82 @@ jobs:
- name: Generate version
id: version
+ shell: pwsh
run: |
- date=$(date '+%y.%-m.%-d')
- runNumber=${GITHUB_RUN_NUMBER:-0}
- version="$date+$runNumber"
- echo "VERSION=$version" >> $GITHUB_OUTPUT
- echo "TAG=v$version" >> $GITHUB_OUTPUT
+ $date = Get-Date -Format "yy.M.d"
+ $runNumber = if ($env:GITHUB_RUN_NUMBER) { $env:GITHUB_RUN_NUMBER } else { "0" }
+ $version = "$date+$runNumber"
+ echo "VERSION=$version" >> $env:GITHUB_OUTPUT
+ echo "TAG=v$version" >> $env:GITHUB_OUTPUT
echo "Generated version: $version"
- name: Inject version
run: |
- echo "${{ steps.version.outputs.VERSION }}" > version.txt
-
+ echo "${{ steps.version.outputs.VERSION }}" | Out-File -FilePath version.txt -NoNewline -Encoding utf8
+
+ - name: Prepare staging directory
+ run: |
+ # Create staging directory
+ New-Item -Path "staging" -ItemType Directory -Force | Out-Null
- - name: Package archive
+ # Copy only files listed in manifest.txt to staging directory
+ Get-Content manifest.txt | Where-Object { $_.Trim() -and -not $_.StartsWith('#') } | ForEach-Object {
+ $file = $_.Trim()
+ $source = Join-Path "." $file
+ $dest = Join-Path "staging" $file
+
+ if (Test-Path $source) {
+ # Create destination directory if needed
+ $destDir = Split-Path $dest -Parent
+ if ($destDir -and -not (Test-Path $destDir)) {
+ New-Item -Path $destDir -ItemType Directory -Force | Out-Null
+ }
+ Copy-Item -Path $source -Destination $dest -Force
+ Write-Host "✓ Staged: $file"
+ } else {
+ Write-Warning "File not found: $file"
+ }
+ }
+
+ Write-Host "`nStaging directory prepared with manifest files"
+
+ - name: Package ZIP archive
run: |
- cat manifest.txt | xargs zip "skHost-${{ steps.version.outputs.VERSION }}.zip"
-
- - name: Upload ZIP artifact
+ $version = "${{ steps.version.outputs.VERSION }}"
+ Compress-Archive -Path "staging\*" -DestinationPath "skHost-$version.zip" -Force
+ Write-Host "Created ZIP: skHost-$version.zip"
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: '8.0.x'
+
+ - name: Install WiX Toolset
+ run: |
+ dotnet tool install --global wix --version 4.0.5
+ wix --version
+
+ - name: Build MSI
+ working-directory: wix
+ run: |
+ # Convert version format from YY.M.D+RUN to YY.M.D.RUN for MSI
+ $version = "${{ steps.version.outputs.VERSION }}"
+ $msiVersion = $version -replace '\+', '.'
+ Write-Host "Building MSI with version: $msiVersion"
+
+ dotnet build -c Release -p:Version=$msiVersion
+
+ - name: Upload artifacts
uses: actions/upload-artifact@v4
with:
- name: skhost-zip
- path: skHost-${{ steps.version.outputs.VERSION }}.zip
+ name: skhost-packages
+ path: |
+ skHost-${{ steps.version.outputs.VERSION }}.zip
+ wix/bin/Release/**/*.msi
retention-days: 1
create-release:
- needs: build-zip
+ needs: build-packages
runs-on: ubuntu-latest
steps:
@@ -59,16 +109,29 @@ jobs:
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
- tag_name: ${{ needs.build-zip.outputs.tag }}
- name: "skHost ${{ needs.build-zip.outputs.version }}"
+ tag_name: ${{ needs.build-packages.outputs.tag }}
+ name: "skHost ${{ needs.build-packages.outputs.version }}"
body: |
*Automated release built from commit ${{ github.sha }}*
## Downloads:
- - `skHost-${{ needs.build-zip.outputs.version }}.zip` - Main application package.
+ - `skHost-${{ needs.build-packages.outputs.version }}.zip` - Portable ZIP archive with PowerShell installation script
+ - `skHost-${{ needs.build-packages.outputs.version }}.msi` - Windows Installer package
## Installation:
- See README.md for installation and usage instructions.
+
+ **MSI Installer (Recommended for personal systems):**
+ Download and run the `.msi` file. The installer provides:
+ - Automatic installation to `%LocalAppData%\SaltSpectre\skHost`
+ - Optional PATH registration for command-line access
+ - Optional auto-start at Windows logon
+ - Start Menu shortcuts
+ - Easy uninstallation via Windows Settings
+
+ **ZIP Archive (Portable usage or PowerShell based installation):**
+ Extract the ZIP and run `skhost.ps1 -Install` or `skhost.ps1 -AutoStart` for manual installation.
+
+ See README.md for detailed usage instructions.
files: artifacts/**/*
prerelease: false
diff --git a/version.txt b/version.txt
index 32bae0a..7617c62 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-dev-sksink
\ No newline at end of file
+dev-wix
\ No newline at end of file
diff --git a/wix/License.rtf b/wix/License.rtf
new file mode 100644
index 0000000..1e1afff
--- /dev/null
+++ b/wix/License.rtf
@@ -0,0 +1,12 @@
+{\rtf1\ansi\deff0\nouicompat{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
+{\*\generator Riched20 10.0.19041}\viewkind4\uc1
+\pard\b\f0\fs24 MIT License\b0\fs20\par
+\par
+Copyright (c) 2026 SaltSpectre\par
+\par
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\par
+\par
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\par
+\par
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\par
+}
diff --git a/wix/Product.wxs b/wix/Product.wxs
new file mode 100644
index 0000000..522b316
--- /dev/null
+++ b/wix/Product.wxs
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wix/skHost.wixproj b/wix/skHost.wixproj
new file mode 100644
index 0000000..3109b60
--- /dev/null
+++ b/wix/skHost.wixproj
@@ -0,0 +1,28 @@
+
+
+ skHost
+ ICE38;ICE64
+ 1.0.0.0
+ Version=$(Version)
+
+
+
+ ..\staging
+ true
+
+
+
+
+ PublishedFiles
+ INSTALLFOLDER
+ true
+
+
+
+
+
+
+
+
+
+
From 699045c8a28519c175d6251daebd76185a271703 Mon Sep 17 00:00:00 2001
From: SaltSpectre <200460916+SaltSpectre@users.noreply.github.com>
Date: Tue, 20 Jan 2026 17:08:56 -0500
Subject: [PATCH 4/6] fix(shortcuts): Update shortcut targets to use
System64Folder for proper execution
---
wix/Product.wxs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wix/Product.wxs b/wix/Product.wxs
index 522b316..9497f83 100644
--- a/wix/Product.wxs
+++ b/wix/Product.wxs
@@ -73,14 +73,14 @@
From 09371a9792ed5483a34503d6917de8491f9e20e1 Mon Sep 17 00:00:00 2001
From: SaltSpectre <200460916+SaltSpectre@users.noreply.github.com>
Date: Tue, 20 Jan 2026 17:10:21 -0500
Subject: [PATCH 5/6] fix(build): Rename MSI file with version during packaging
process
---
.github/workflows/build-release.yml | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml
index 5e104af..be3bde7 100644
--- a/.github/workflows/build-release.yml
+++ b/.github/workflows/build-release.yml
@@ -87,13 +87,26 @@ jobs:
dotnet build -c Release -p:Version=$msiVersion
+ - name: Rename MSI with version
+ run: |
+ $version = "${{ steps.version.outputs.VERSION }}"
+ $msiFile = Get-Item "wix\bin\Release\**\*.msi" | Select-Object -First 1
+ if ($msiFile) {
+ $newName = "skHost-$version.msi"
+ Move-Item -Path $msiFile.FullName -Destination $newName -Force
+ Write-Host "Renamed MSI to: $newName"
+ } else {
+ Write-Error "MSI file not found"
+ exit 1
+ }
+
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: skhost-packages
path: |
skHost-${{ steps.version.outputs.VERSION }}.zip
- wix/bin/Release/**/*.msi
+ skHost-${{ steps.version.outputs.VERSION }}.msi
retention-days: 1
create-release:
From 3106a4adfb3fd4f9f0161eeaedcc896e4eaf193d Mon Sep 17 00:00:00 2001
From: SaltSpectre <200460916+SaltSpectre@users.noreply.github.com>
Date: Tue, 20 Jan 2026 17:13:53 -0500
Subject: [PATCH 6/6] fix(wix): Update MSI renaming logic to use Get-ChildItem
for better file retrieval; ignore ICE91 warning (irrelevant)
---
.github/workflows/build-release.yml | 2 +-
wix/skHost.wixproj | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml
index be3bde7..92cf693 100644
--- a/.github/workflows/build-release.yml
+++ b/.github/workflows/build-release.yml
@@ -90,7 +90,7 @@ jobs:
- name: Rename MSI with version
run: |
$version = "${{ steps.version.outputs.VERSION }}"
- $msiFile = Get-Item "wix\bin\Release\**\*.msi" | Select-Object -First 1
+ $msiFile = Get-ChildItem -Path "wix\bin\Release" -Filter "*.msi" -Recurse | Select-Object -First 1
if ($msiFile) {
$newName = "skHost-$version.msi"
Move-Item -Path $msiFile.FullName -Destination $newName -Force
diff --git a/wix/skHost.wixproj b/wix/skHost.wixproj
index 3109b60..4fc1557 100644
--- a/wix/skHost.wixproj
+++ b/wix/skHost.wixproj
@@ -1,7 +1,7 @@
skHost
- ICE38;ICE64
+ ICE38;ICE64;ICE91
1.0.0.0
Version=$(Version)