Skip to content
⌘ NSIS Forum Archive

Capture output of a command

5 posts

Madhusudhanan#

Capture output of a command

How to capture a output of a command to a variable,say i need to capture the output of a command sc.exe.
Anders#
nsExec

but you should not use sc.exe to modify services, see http://nsis.sourceforge.net/How_do_I...heck_a_service
Madhusudhanan#
I am not going to modify the service i just want to get the information of a service say sc.exe qc Apache2.2 will give the configuration information of it and from it i want to grep the BINARY_PATH_NAME alone,so nsExec::Exec 'sc.exe qc apache' will just run the command for me ,how to get the output in to a variable ,i am a newbie to NSIS plz help me.