Archive: How to read line from cmd


How to read line from cmd
How to read line from cmd?


???

What do you need?


if i entry "sample text" on cmd and press enter,i want to get result "sample text".


There are some solutions given in the manual:

http://nsis.sourceforge.net/Docs/AppendixE.html#E.1.11

This is another one in the wiki:

http://nsis.sourceforge.net/Get_command_line_parameters


Ok,but how to use command on first sample?Invalid command: ${GetParameters}


!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.