AlexCode Posted March 15, 2005 Posted March 15, 2005 Hi... I'm having a problem trying to print to DOS printer from a .net program. I use the following line: System.Diagnostics.Process.Start("PRINT", "/D:LPT1 " & Application.StartupPath & "\CodeBarPrint.txt") 'OR System.Diagnostics.Process.Start("C:\WINDOWS\system32\PRINT.EXE", "/D:LPT1 " & Application.StartupPath & "\CodeBarPrint.txt") 'OR System.Diagnostics.Process.Start("PRINT", Application.StartupPath & "\CodeBarPrint.txt") but nothing is printed... Tho, directly in the shell, the print command works and prints the file perfectly. Notes: 1- This is running on a Windows 2003 Server machine 2- This has already worked with the last line of the example I've provided, on a Windows XP machine. Thaks for any help... Alex :p Quote Software bugs are impossible to detect by anybody except the end user.
AlexCode Posted March 15, 2005 Author Posted March 15, 2005 (edited) I'm really far from knowing whats happening... Even making an SQL Server 2000 Stored Procedure to call xp_cmdshell and execute the DOS print command, logged as SA, it doesn't work... Even tho, calling it from the Query Analyser it works... My application must be wrapped on some kind of windows role that os blocking me to print to DOS... Any help out there!! Alex :p Edited March 15, 2005 by AlexCode Quote Software bugs are impossible to detect by anybody except the end user.
AlexCode Posted March 15, 2005 Author Posted March 15, 2005 I'm sorry for my next line but... FFFFUUUUUUCCCCKKKKKKK!!!!! haaaa... much better now... Just to say that all this was happening because I wasn't using a DOS path... I was using a file-to-print path with spaces and PRINT command doesn't recognise those... Damn stupid problems... Thanks anyways... Alex :p Quote Software bugs are impossible to detect by anybody except the end user.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.