Files
nsis-plugin-nsshellexecasuser/examples/example.nsi
T
Simone c98a0d37d9 chore: initial commit (extracted from Launchers monorepo)
Plugin: nsShellExecAsUser v1.0.0
Architectures: x86-ansi, x86-unicode, amd64-unicode
License: zlib
2026-04-29 14:04:59 +02:00

20 lines
491 B
NSIS

; ShellExecAsUser Example
; Executes notepad.exe as standard user from an elevated installer
!include "LogicLib.nsh"
; Add plugin dir if needed
; !addplugindir "plugins\x86-unicode"
Name "ShellExecAsUser Example"
OutFile "example_output.exe"
RequestExecutionLevel admin
ShowInstDetails show
Section "Test"
; Run notepad as the logged-on user (even from elevated context)
ShellExecAsUser::ShellExecAsUser "open" "notepad.exe" ""
Pop $0
DetailPrint "Return: $0"
SectionEnd