Skip to content
⌘ NSIS Forum Archive

Interaction with Powershell Script

3 posts

Dr.What#

Interaction with Powershell Script

I'm quite new to NSIS. Is it possible to start a Powershell-script from an NSIS-Script, pass a String to the Powershell-script and then read back a String that the Powershell-script returns?

In short: NSIS ---[String]---> Powershell ---[String]---> NSIS

If yes, an example would be great.
Thanks a lot, drw
Anders#
Something like this:

Section
nsExec::ExecToStack '"powershell.exe" -noprofile -command "echo Hello"'
Pop $0
Pop $1
DetailPrint $0=$1
SectionEnd
You might want to use a full path to powershell so you know you are getting the correct version etc...