Is it possible to pass netlist via command line to ngspice instead of using input file?
As commented before, the Window GUI version of ngspice will not work with pipes due to a Windows specific I/O handling. 
Maybe you could try finding a workaround.  

I think you should have the GUI write the netlist to a file called e.g. "circuit.cir" and have the code of the GUI execute ngspice circuit.cir.  

Another option having the GUI making a string based on the netlist and using a batch file which parses the netlist string, writes it to (e.g.) "circuit.cir" and lastly, executes ngspice circuit.cir.
Make sure you seperate each line of the netlist with a unique character (e.g. ¶ or ­§ or whatever) when making one big string of it.