Skip to content
⌘ NSIS Forum Archive

ShellExecute with System Plugin?

4 posts

billym#

ShellExecute with System Plugin?

Can someone please show me how to call shellexecute using the system pligin?
Joel#
Joost is right... but if you insist:

;Show command
!define SW_HIDE 0
!define SW_SHOWNORMAL 1
!define SW_SHOWMINIMIZED 2
!define SW_SHOWMAXIMIZED 3
!define SW_SHOWNOACTIVATE 4
!define SW_SHOW 5
!define SW_MINIMIZE 6
!define SW_SHOWMINNOACTIVE 7
!define SW_SHOWNA 8
!define SW_RESTORE 9
!define SW_SHOWDEFAULT 10

OutFile "Tester.exe"
Name "Tester"
Caption "Tester"
XPStyle "on"

Function ".onInit"
System::Call 'shell32::ShellExecuteA(i 0, t "Open", t "notepad.exe", i 0, t "$EXEDIR", i ${SW_SHOWNORMAL}) i r1'
Abort
FunctionEnd
billym#
I need to execute with the SW_HIDE param. I was under the impression that ExecShell does not allow this param to be passed.