Windows 7, DFD and printing

Questions and Answers about DataEase for DOS

Windows 7, DFD and printing

Postby Phil Winkler » Tue Mar 09, 2010 6:25 pm

It seems there are real issues trying to redirect a USB printer to an LPT port. It results in a Access Denied msg when trying to print to it even though issuing the appropriate NET USE command completes successfully.

Googling the issue results in thousands of hits, but we haven't found a definitive solution yet. It does appear to involve UAC properties, but just where to apply them is not clear.

Trying to map to a shared network printer is fraught with problems. After a while your head is spinning from all the avenues you have to go down.
Phil Winkler
PLM Consulting, Inc.
pwinkler@plmconsulting.com
Phil Winkler
 
Posts: 889
Joined: Fri Sep 07, 2007 12:45 pm
Has thanked: 0 time
Been thanked: 0 time
 

Re: Windows 7, DFD and printing

Postby John Middleton » Wed Mar 10, 2010 11:46 am

Phil

Redirecting printing under Windows 7 / net use CAN be made to work – I did it for a client up North a few weeks back who will not be swayed from using a DFD 4.53 application written circa 1996 (not by me) and has been in daily use ever since. This (client’s) Yorkshire man's attitude is – “don’t be silly, how can software wear out – there’s no moving bits”, as he invests in a replacement 7 PC.

Have you tried?

If the port (LPT1 ?) physically exists, then high (admin) security is required for the redirection.

Any CMD or Batch files used to start / redirect / run / mod DFD should be set to run in admin mode too

If running DFD in XP Mode , then it is good practice to establish the printer under this as well as under 7 itself (unique names) – the use the XPM name in the Net Use command, not the actual name.

And finally – USB3 ports (now being fitted to most modern PC builds) require resetting in the BIOS to USB2 compatible in order to be DOS friendly

John
ShopEase
John Middleton
 
Posts: 110
Joined: Mon Sep 10, 2007 3:14 pm
Location: England
Has thanked: 0 time
Been thanked: 1 time
 

Re: Windows 7, DFD and printing

Postby Graham Smith » Wed Mar 10, 2010 12:59 pm

The tried and tested method in XP was to connect the local printer to a USB port, then share the printer. You could then Net Use LPT1 to that local share. Works just fine.

We've recently tried to do the same thing with both Vista and Win 7. Everything works as it should until you try and actually print, then it fails. With Vista, at least, using the DOS print command results in a error that it is "unable to initialize PRN".

It is possible to net use lpt1 to a true network resource, so it's not the net use itself. More likely it's an issue of rights or UAC or something else silly that's been introduced.

There are still some tests to run but for now we've run out of ideas and were just wondering if someone else had actually run into this wall and found the way around it.

---------------
Addendum: One thing we still need to explore is the printer driver itself. It's possible that the driver is what is creating the problem.
Graham Smith
DataSmith, Delaware
"For every expert there is an equal and opposite expert.", Arthur C. Clarke (1917 - 2008)
"X-Clacks-Overhead: GNU Terry Pratchett"
User avatar
Graham Smith
 
Posts: 2501
Joined: Fri Sep 07, 2007 11:31 am
Location: Delaware, USA
Has thanked: 0 time
Been thanked: 1 time
 

Re: Windows 7, DFD and printing

Postby Phil Winkler » Wed Mar 10, 2010 1:25 pm

Thanks for posting, John.

Your comment about the USB3 setting got me running to my BIOS on the new pc, but the setting is enabled for Legacy USB Support which is the only setting referencing USB. This was for Graham's problem with a local printer on USB.

My pc does not have a physical LPT port at all.

It's Win7 Professional. The net use command completes successfully and net show reveals the redirect.

COPYing a file to lpt1 results in "Access Denied"
PRINTing a file to lpt1 results in "Unable to initialize PRN"

Printing from DFD gives the usual "Printer not ready, etc."

User is Administrator or has Admin rights. Same results either way.

Now, this is trying to access a networked printer. Not a local one that is shared to itself via the usual method of printing to a USB printer. The networked printer is on my desktop pc and is shared.
net use reveals: LPT1 \\phil-main\hplaserj

Any other ideas?
Phil Winkler
PLM Consulting, Inc.
pwinkler@plmconsulting.com
Phil Winkler
 
Posts: 889
Joined: Fri Sep 07, 2007 12:45 pm
Has thanked: 0 time
Been thanked: 0 time
 

Re: Windows 7, DFD and printing

Postby John Middleton » Wed Mar 10, 2010 3:27 pm

Still sounds like a permissions problem to me.

A few random suggestions.

If you open a DOS window (as an administrator Ctrl + Shift = Enter) and type

net user administrator / active:yes

What is the response?

Does lpt1 exist in the Device Manager (even though not as a physical interface) – if so have you tried redirecting to say, lpt2?

What happens if you use the IP address of the printer, instead of its name in the net use command? This will rule out driver issues.

And, at the risk of “teaching grandma” this is not a Firewall or AV issue? Try temporarily disabling?

John
ShopEase
John Middleton
 
Posts: 110
Joined: Mon Sep 10, 2007 3:14 pm
Location: England
Has thanked: 0 time
Been thanked: 1 time
 

Re: Windows 7, DFD and printing

Postby Phil Winkler » Wed Mar 10, 2010 4:04 pm

Hey, John,

Logged in as administrator that returns:
The command completed successfully.

Logged in as me I get:
System error 5 has occurred
Access is denied.

Hmmm...time to check rights for me, isn't it?

Wow..this security is a PITA! Logged in as Administrator I open users and create a new account as Phil, Administrator, no password. When I log in as Phil my account has now been changed to Standard and I cannot change it.

Logged in as admin again and try to change the other account from Standard and as soon as I click Administrator the Change Type button grays out.

This is ridiculous.
Phil Winkler
PLM Consulting, Inc.
pwinkler@plmconsulting.com
Phil Winkler
 
Posts: 889
Joined: Fri Sep 07, 2007 12:45 pm
Has thanked: 0 time
Been thanked: 0 time
 

Re: Windows 7, DFD and printing

Postby Phil Winkler » Wed Mar 10, 2010 4:40 pm

I'll be damned.

Even though the network printer was shared it's advanced properties were set to Print directly to the printer.

When I changed it to Spool everything starts working as it is supposed to. :roll:

Sheesh.......what next?
Phil Winkler
PLM Consulting, Inc.
pwinkler@plmconsulting.com
Phil Winkler
 
Posts: 889
Joined: Fri Sep 07, 2007 12:45 pm
Has thanked: 0 time
Been thanked: 0 time
 

Re: Windows 7, DFD and printing

Postby Graham Smith » Wed Mar 10, 2010 5:14 pm

Just to be clear, it turns out that Phil and I are talking about completely different things. His problem related to trying to use a networked printer on another computer whereas I'm having a problem with a printer connected to a USB port on the same computer.
Graham Smith
DataSmith, Delaware
"For every expert there is an equal and opposite expert.", Arthur C. Clarke (1917 - 2008)
"X-Clacks-Overhead: GNU Terry Pratchett"
User avatar
Graham Smith
 
Posts: 2501
Joined: Fri Sep 07, 2007 11:31 am
Location: Delaware, USA
Has thanked: 0 time
Been thanked: 1 time
 

Re: Windows 7, DFD and printing

Postby John Middleton » Thu Mar 11, 2010 8:45 am

Graham

The error message “unable to initialize PRN” (PRN being the default) suggests that the printer name has not been recognised.

Check that you are using the XPM share name and that 7 has not (unhelpfully) added an ampersand or dollar share after you have closed the share window (it is apt to do so). Check that you have spaces in the net use command line between lpt1 and \\dospc\dosprint and the /persistent switch.

Note that some latter day HP printers require their Windows based monitoring / imaging software to be active, before they will print anything

John
ShopEase
John Middleton
 
Posts: 110
Joined: Mon Sep 10, 2007 3:14 pm
Location: England
Has thanked: 0 time
Been thanked: 1 time
 

Re: Windows 7, DFD and printing

Postby Graham Smith » Thu Mar 11, 2010 1:25 pm

John Middleton wrote:Check that you are using the XPM share name and that 7 has not (unhelpfully) added an ampersand or dollar share after you have closed the share window (it is apt to do so). Check that you have spaces in the net use command line between lpt1 and \\dospc\dosprint and the /persistent switch.

Bear in mind that I've been doing this on XP computers for several years now and know how to do it. It just doesn't work.

I'm starting to wonder if it is the driver itself that is the issue rather than the net use. I'm just trying to find out if others have this working in Vista so I can be sure it will work.
Graham Smith
DataSmith, Delaware
"For every expert there is an equal and opposite expert.", Arthur C. Clarke (1917 - 2008)
"X-Clacks-Overhead: GNU Terry Pratchett"
User avatar
Graham Smith
 
Posts: 2501
Joined: Fri Sep 07, 2007 11:31 am
Location: Delaware, USA
Has thanked: 0 time
Been thanked: 1 time
 

Re: Windows 7, DFD and printing

Postby ALANKEST » Mon Oct 22, 2012 3:45 pm

I have used Alex Goldberg's DOSPRN with DfD 4.5.1 happily for 15+ years under Win XP, Vista and 7. At $15(?) it was the best piece of shareware I ever bought! It has worked with a succession of different inkjet printers, currently an HP Officejet 5610 while described inDfD as an Epson LQ-2500 (my original printer).

You need to fiddle around initially with DfD and DOSPRN CPI LPI and margins and use fixed fonts, but once setup file and forget. Text only.
ALANKEST
 
Posts: 5
Joined: Tue Oct 16, 2012 5:30 pm
Has thanked: 0 time
Been thanked: 0 time
 
 

Return to DataEase for DOS

Who is online

Users browsing this forum: No registered users and 4 guests

cron