Skip to content

NSIS: support admin vs per-user installs#334

Open
michelu89 wants to merge 1 commit into
eclipse-esmf:mainfrom
bci-oss:fix/adjust-win-installer-logic
Open

NSIS: support admin vs per-user installs#334
michelu89 wants to merge 1 commit into
eclipse-esmf:mainfrom
bci-oss:fix/adjust-win-installer-logic

Conversation

@michelu89

@michelu89 michelu89 commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Update installer.nsi to avoid unnecessary UAC prompts and correctly handle admin vs standard-user installs. RequestExecutionLevel is set to "highest" and install/uninstall logic now detects account type to choose SetShellVarContext and to write Add/Remove Programs entries to HKLM (admin) or HKCU (per-user). Removed unnecessary icacls calls and ensure the uninstall registry key includes DisplayIcon/InstallLocation and NoModify/NoRepair values. Uninstaller now removes the entry from the same hive it was written to. Added robust previous-install detection across HKLM native, HKLM WOW6432Node and HKCU, and fixed file-size calculation by replacing FileSeek with a System/GetFileAttributesEx-based FileSizeNew to handle files >2GB. Also corrected the disk-space section to use the SEC_SPACE constant.

Description

Please include a summary of the changes and the related issue. List any dependencies that are required for this change.

Fixes #(number of issue in GitHub)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Additional notes:

Add any other notes or comments here.

@michelu89 michelu89 self-assigned this Mar 9, 2026
@michelu89 michelu89 added the enhancement New feature or request label Mar 9, 2026
Update installer.nsi to avoid unnecessary UAC prompts and correctly handle admin vs standard-user installs. RequestExecutionLevel is set to "highest" and install/uninstall logic now detects account type to choose SetShellVarContext and to write Add/Remove Programs entries to HKLM (admin) or HKCU (per-user). Removed unnecessary icacls calls and ensure the uninstall registry key includes DisplayIcon/InstallLocation and NoModify/NoRepair values. Uninstaller now removes the entry from the same hive it was written to. Added robust previous-install detection across HKLM native, HKLM WOW6432Node and HKCU, and fixed file-size calculation by replacing FileSeek with a System/GetFileAttributesEx-based FileSizeNew to handle files >2GB. Also corrected the disk-space section to use the SEC_SPACE constant.
@michelu89 michelu89 force-pushed the fix/adjust-win-installer-logic branch from 1901141 to 11e6fe8 Compare April 22, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants