c98a0d37d9
Plugin: nsShellExecAsUser v1.0.0 Architectures: x86-ansi, x86-unicode, amd64-unicode License: zlib
20 lines
491 B
NSIS
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
|