1.

Solve : VBscript named pipe?

Answer»

Quick ask for a change - I want to USE VBScript to create, and write to, a named pipe in Windows 7 Professional 64 bit. All the stuff I have found on the web says that named pipe SUPPORT in VBscript is limited to treating the pipe as a text file, e.g.:

Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("\\.\pipe\PipeName", True)
a.WriteLine("This is a test.")
a.Close

There are lots of variants of this I have seen but all I get is

pipetest.vbs(2, 1) Microsoft VBScript runtime error: File not found

I have tried 32 and 64 bit cscript and wscript, no difference. Any ideas? Am I missing something really basic here? Some setting I have OVERLOOKED or not thought of?





It's not part of my knowledge - is this of any use?

http://translate.google.com.au/translate?hl=en&sl=de&u=http://www.ms-office-forum.net/forum/showthread.php%3Ft%3D213124&prev=/search%3Fq%3Dnamed%2Bpipe%2Bvbs%26sa%3DG%26hl%3DenThat link was interesting. I have found I was making a newbie mistake which was I was getting the named pipe server and client back to front. The script I wrote was failing because there was nothing for it to write to, the pipe had to be created first. I found this out by getting the diagnostic tools makepipe.exe and readpipe.exe off a Microsoft SQL Server 2000 install CD and running makepipe which creates a pipe and WAITS for a message to come down it from readpipe (or my script).



Discussion

No Comment Found