Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Configure non-parallel printer for use with LPTx:


  • Please log in to reply

#1
KGHN

KGHN

    Member

  • Member
  • PipPip
  • 66 posts
I need to use USB and other non-DOS-compatible printers with my FoxPro for DOS 2.6 applications. On Win networks, it is possible to map any printer on a remote machine as LPTx:, and use it from an MSDOS application or CMD = COMMAND prompt window. This only works on printers that are *not local*.

***MY TOPIC IS*** I have heard that there is a way to redesignate and use a local printer under XP. I want to learn how, or know for sure that the local redesignation is not possible.

I searched the GeeksToGo site using your search as best I could, hampered by the "less than 4 characters" rule in not being able to look for USB, DOS, or LPT. I have also tried Googling the full 'net on several occasions, and Googling just the GeeksToGo website. I did not find any answers.

I would really appreciate the help of you XP experts on this one. My extensive experience is mostly with MS-DOS and W98, so please make XP instructions kinda step by step.

Thanks so much, KGHN
  • 0

Advertisements


#2
Retired Tech

Retired Tech

    Retired Staff

  • Retired Staff
  • 20,563 posts
Is this what you need to do

http://support.micro...kb;en-us;314499
  • 0

#3
KGHN

KGHN

    Member

  • Topic Starter
  • Member
  • PipPip
  • 66 posts
Sorry, Keith, that link is to instructions for using a printer *across a network* with an LPT label. I need to do the same thing (create an LPT designation) for a *local* printer. Many times, the machine that needs the ability to use a non-DOS-compatible (usually USB) printer from a DOS program is not a network member.

Thanks for a good first try.
KGHN
  • 0

#4
Retired Tech

Retired Tech

    Retired Staff

  • Retired Staff
  • 20,563 posts
I could only see those instructions

I have posted it to the Trusted Techs
  • 0

#5
yardguard

yardguard

    Member

  • Member
  • PipPipPip
  • 135 posts
Is this what you're looking for?

http://www.geekswith...cles/26204.aspx

trying to help out......
  • 0

#6
KGHN

KGHN

    Member

  • Topic Starter
  • Member
  • PipPip
  • 66 posts
That looks like just the ticket. I will do some testing and post a followup. Thanks *so* much, you nice person yardguard.
KGHN
  • 0

#7
telebog

telebog

    New Member

  • Member
  • Pip
  • 1 posts
I have the same problem under windows 98, how can help me???
  • 0

#8
KGHN

KGHN

    Member

  • Topic Starter
  • Member
  • PipPip
  • 66 posts
Hi Telebog,

"...same problem under windows 98, how can help me?"

I wish I could. I have seen some third party software that claims to do it, but with the number of user sites I have, expense would be considerable.

What I know so far about DOS printers on W98:

Best case:
Some, like old HP Laserjets (up to the 6 series), are DOS compatible and work well on any LPT there is a physical port for. Ditto the old Epson. Okidata, and Citizen dotmatrix printers. W98 even has included print drivers for these old stalwarts. No problem in either DOS window or MS-DOS mode.

For DOS programs running in a W98 window (not booted as MS-DOS mode):
ANY printer on a networked W98 machine that belongs to a DIFFERENT station on the network (NOT local) can be accessed from DOS via a Capture Printer Port on the Details tab of the W98 printer setup icon (Start/Printers/Rt-Click printer's icon for list choose Properties).
If the network-mate's printer doesn't have an icon on your station yet, you will need to first: A) make sure on the printer's local station the printer is shared (note the Shared As name), then B) choose Add Printer / Network printer on your station and set it up.

Helpful hint for finding computer's Host Name...
W98: ControlPanel/Network/Identification Tab "Computer Name"
XP: My Network Places has a folder for each computer

I have not yet found a W98 USB-driven or Windows-only LOCAL printer solution... does anyone know a software based network adapter for W98 like Microsoft Loopback Adapter is for WinXP?

KGHN
  • 0

#9
KGHN

KGHN

    Member

  • Topic Starter
  • Member
  • PipPip
  • 66 posts
How to use a USB printer as a parallel printer from a DOS program on a Windows XP computer.
--------------------------------------------------------
This has tested to work on a WinXP machine. The test machine used to be part of a network, and still has an Ethernet board in it, but no cable hooked up. We did have to install the Loopback Adapter for it to think it has an active network and cooperate. For those starting from a machine with no network/never had one, I wonder if installing TCP/IP might be needed after installing the virtual "network adapter"... Anyway, here's the rundown:

1. You must have Administrator privileges.

2. If the computer is not an active network member, install the Loopback Adapter:
A) Control Panel / Add Hardware
B) Tell it: I have already connected the hardware
C) Tell it: Add a new hardware device
D) Tell it: manually select from a list (Advanced)
E) Select: Network Adapters, Manufacturer Microsoft
F) Select: Microsoft Loopback Adapter

G) Configure the Loopback Adapter: Control Panel / Network Connections / Loopback Adapter / tcp/ip properties. "The loopback adapter is a virtual network adapter and can be configured the same as a regular network card. Set the adapter to have a static IP address such as 192.168.1.1/ 255.255.255.0"

H) Test the fictional network by opening a command window (Start / Run CMD) C:>PING 192.168.1.1 should be successful.

3. Find out the computer's Hostname: One method is to click Start, right click on My Computer and select Manage. Right click on the root of the tree in the left pane of the Computer Management window (Computer Management (Local)) and select Properties. Select the Computer Name tab. Record the name for use later. "HostName" in my example later.

4. Start / Printers / Right-click the printer you want to use. Choose Sharing. If it isn't shared, share it. Record the Shared As name for use later. "PrntName" in my example later.

5. Open Notepad. Type:
NET USE LPT2: \\HostName\PrntName /persistent:yes
Save As C:\PrntName.bat

6. Explore to the root directory (C: drive), click-and-drag the PrntName.bat file onto the desktop.

7. Double-click PrntName to activate the printer alias.

8. Test the printer's response from DOS:
A) Start / Run CMD
B) C:>COPY CON: LPT2:
Type some stuff, then end with Ctrl-L Ctrl-Z. (^L^Z)
When you press Enter, it should say "1 files copied" and the stuff you typed should be printed out by the printer. (FYI: Ctrl-L is page eject, Ctrl-Z is end of file.)
C) C:>EXIT to close the Command Prompt window

9. If the test worked, the printer should be ready to use as LPT2: from any DOS program. If Windows ever "forgets" the alias, just use the PrntName batchfile on the desktop to re-make the relationship.
  • 0

#10
ComputerJoe

ComputerJoe

    Member

  • Member
  • PipPip
  • 24 posts
I can't really help you with this, but this may help
  • 0

#11
KGHN

KGHN

    Member

  • Topic Starter
  • Member
  • PipPip
  • 66 posts
Dec 16 2005

Well, there is still one fly in the ointment. Not all modern printers do *emulation*, which means interpretation of escape codes to produce various fonts and type sizes following the Epson, HP PCL or other printer control code rule set. If your DOS program uses escape codes to produce compressed type, the compression may not work and your result may wrap or truncate lines. I suspect this could be overcome with an advanced driver. Any comments?

Thanks, KGHN
  • 0

#12
KGHN

KGHN

    Member

  • Topic Starter
  • Member
  • PipPip
  • 66 posts
Followup: Today I was working with an XPproSP2 machine that has an Ethernet port but no network buddies. It is also not connected to the Internet. NET USE LPT2: \\computer\printer /PERSISTENT:YES was giving system error 66 (network resource type is not correct) even after the MS Loopback Adapter module was installed.

I think this is what finally helped:
1) Open the Network Connections folder.
2) Right click the local area network connection (I used the loopback, not the Ethernet board) and click Properties.
3) Double click Internet Protocol (TCP/IP).
4) Click Advanced.
5) Click WINS.
6) Click the Enable NetBIOS Over TCP/IP button.

I am not sure the Loopback Adapter was needed - if anyone tests this, please post.

Tips:
In a Command Prompt window, NET VIEW should show the exact spelling of the machine's own name.
NET VIEW \\computer (where computer is the machine's own name) should list the shared printer

Error 53 (network path was not found) is typical if the computer's name is spelled wrong.
NET USE and NET VIEW don't seem to be case-sensitive under XP.
NET USE LPTn: and NET USE LPTn both seem to be recognized.
  • 0

#13
KGHN

KGHN

    Member

  • Topic Starter
  • Member
  • PipPip
  • 66 posts
Better PrntName.bat content (see above for original Oct 25 2005 one line version)...

NET USE LPT2: /D
NET USE LPT2: \\HostName\PrntName /persistent:yes
PAUSE
EXIT

This makes sure there isn't already another assignment to the parallel port that might make the command fail, and waits for the user to read messages and press a key before closing the window.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP