/build/static/layout/Breadcrumb_cap_w.png

Scripting a BAT file with > to file on K1000 fails

I have a script that uses the Launch Batch File to run a process (a CSCRIPT to list priters but I've seen this with other things)

It does this

CSCRIPT.EXE PRNMNGR.vbs -L > c:\InstalledPrinters.txt

However, when it runs it inserts an extra 1 after the > and the pipe fails. If the BAT is double-clicked it works properly.

I think it may be specific to Windows XP.

Does anyone know why this happens?


0 Comments   [ + ] Show comments

Answers (2)

Posted by: dugullett 11 years ago
Red Belt
0

Is there anyway you can take a screenshot of your setup? I'm running a vbs and outputting to a txt and I'm not experiencing problems with it. What version agent/server are you running? You might want to enable logging on one of your test machines to verify what exactly is happening.

Posted by: jagadeish 11 years ago
Red Belt
0

cscript c:\windows\system32\prnmngr.vbs -l > c:\InstalledPrinters.txt

should do the trick..

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ