Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InnoSetup: write install location to the registry #301

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions .github/workflows/windows-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,31 @@ jobs:
- name: debug - print log
run: cat "${{github.workspace}}\InnoSetup-Install.log"




- name: Check InstallLocation Registry Value
shell: powershell
run: |
$registryPath = "HKLM:\Software\OpenZFS\OpenZFS On Windows"
$valueName = "InstallLocation"
$expectedValue = "C:\Program Files\OpenZFS On Windows"

if (-Not (Test-Path -Path $registryPath)) {
Write-Host "Registry path $registryPath does not exist."
exit 1
}

$registryValues = Get-ItemProperty -Path $registryPath
if (-Not ($registryValues.PSObject.Properties.Name -contains $valueName)) {
Write-Host "Registry path $registryPath does not contain value $valueName."
exit 1
}

$value = $registryValues.$valueName
if (-Not ($value -eq $expectedValue)) {
Write-Host "Registry value $valueName=$value not as expected, expected $expectedValue."
exit 1
}

Write-Host "Found installation location $value"



Expand Down
5 changes: 5 additions & 0 deletions contrib/windows/Inno.Setup/ZFSInstall-debug.iss
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ WizardImageFile="{#SourcePath}\openzfs-large.bmp"
; SignTool=signtoola
; SignTool=signtoolb
SignTool=signtoolc
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64


[Languages]
Expand Down Expand Up @@ -119,3 +121,6 @@ Filename: "{app}\ZFSInstaller.exe"; Parameters: "install .\OpenZFS.inf"; StatusM
[UninstallRun]
Filename: "{app}\ZFSInstaller.exe"; Parameters: "uninstall .\OpenZFS.inf"; RunOnceId: "driver"; Flags: runascurrentuser;

[Registry]
Root: HKLM; Subkey: "Software\{#MyAppPublisher}\{#MyAppName}"; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: "Software\{#MyAppPublisher}\{#MyAppName}"; ValueType: string; ValueName: "InstallLocation"; ValueData: "{app}"
Loading