Skip to content
⌘ NSIS Forum Archive

Exec command > text-file Problem

2 posts

intruder1980#

Exec command > text-file Problem

Hey,

I am trying to store a list of local users in a text-file by using:

Exec '"net.exe" user > test.txt'

But this seems not to be working. In CMD it works fine.
Is there something wrong with my line or is Exec not able to do ">"?

Thanks in advance Geeks 😉

NSIS 2.43
Anders#
you can not use redirection with Exec*, you need to use one of the exec plugins (nsExec or http://nsis.sourceforge.net/Category:Plugins). Its probably better to call the actual windows API with the system plugin, but it is more work:

Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.

Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.