R
Ray
First off, before folks answer, I know how to redirect to LPT1 - I just
don't know how to automatically capture whatever the default printer is,
then redirect to LPT1..... (Also, sorry for posting this in both XP and
2000, but I'm hoping someone can help me on this).
So here's my problem. I have DOS app X, that needs to be redirect to
[Windows Default Printer]. The Windows default printer will vary from user
to user, and possibly vary as the user changes it. The DOS app is hard
coded to print to LPT1.
In any Windows environment, you can add LPT1 to any printer. In DOS
commands you can tell LPT1 = \\printerlocation\printername But - the key
there is that you know the printername/location. Does anybody have any
clean/simple/quick ways of scripting somethat that I could preface the DOS
app with to basically do a set of LPT1 to DefaultPrinterX. The setting of
LPT1 is a straight forward two word operation, however, I can't think of any
clean way to determine what exactly the current Default Printer is. It
could be IP/IPX or even local (in which case LPT1 is already happy camper).
Any thoughts? I have found one article on it, but it doesn't seem to do
what I want, too much scripting for something that I believe should be far
easier. I found this:
http://oldlook.experts-exchange.com/Hardware/Printers/Q_20786291.html
I don't mind using a cscript to pull something, but if there is a simplified
DOS command I could simply toss into the .bat file that I have that kicks
off the DOS app, then life all the easier. As always, changing app code is
a no-no that ain't gonna happen anytime in my lifetime.
I thoroughly appreciate it!
don't know how to automatically capture whatever the default printer is,
then redirect to LPT1..... (Also, sorry for posting this in both XP and
2000, but I'm hoping someone can help me on this).
So here's my problem. I have DOS app X, that needs to be redirect to
[Windows Default Printer]. The Windows default printer will vary from user
to user, and possibly vary as the user changes it. The DOS app is hard
coded to print to LPT1.
In any Windows environment, you can add LPT1 to any printer. In DOS
commands you can tell LPT1 = \\printerlocation\printername But - the key
there is that you know the printername/location. Does anybody have any
clean/simple/quick ways of scripting somethat that I could preface the DOS
app with to basically do a set of LPT1 to DefaultPrinterX. The setting of
LPT1 is a straight forward two word operation, however, I can't think of any
clean way to determine what exactly the current Default Printer is. It
could be IP/IPX or even local (in which case LPT1 is already happy camper).
Any thoughts? I have found one article on it, but it doesn't seem to do
what I want, too much scripting for something that I believe should be far
easier. I found this:
http://oldlook.experts-exchange.com/Hardware/Printers/Q_20786291.html
I don't mind using a cscript to pull something, but if there is a simplified
DOS command I could simply toss into the .bat file that I have that kicks
off the DOS app, then life all the easier. As always, changing app code is
a no-no that ain't gonna happen anytime in my lifetime.
I thoroughly appreciate it!