Skip to content
⌘ NSIS Forum Archive

How to read line from cmd

6 posts

pengyou#
There are some solutions given in the manual:



This is another one in the wiki:

pengyou#
!include "FileFunc.nsh"

Name "Demo"
OutFile demo.exe

RequestExecutionLevel user

Section default
${GetParameters} $R0
MessageBox MB_OK "Command-line parameters = $R0"
SectionEnd
Compile this then run the demo.exe program with something on the command-line (e.g. demo.exe /123) and a message box will pop up showing the parameters (e.g. "Command-line parameters = /123").

NSIS comes with lots of documentation and example files; there is a lot of useful information there.