Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3597808
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:09:53+00:00 2026-05-18T20:09:53+00:00

A few years back, another clever programmer set up a VB.NET service to print

  • 0

A few years back, another clever programmer set up a VB.NET service to print to one of the server’s installed printers. The job queried a database table to see if it had any print requests, which specify the file to print and the name of the printer to send it to. The job constructs a 3-part command line incantation and executes it; it goes a little something like this:

net use LPT2: IP_1.2.3.4 /user:domain\userid password >> netuse1.out
copy someExistingFile.pdf LPT2 >> copy.out
net use LPT2: /delete >> netuse2.out

We’ve been asked to make other unrelated changes to this job, and happily complied. Only any version of the job we deploy and run simply will not print. The first statement fails with “System error 67 has occurred. The network name cannot be found.”

The job has queried the registry to find the port name for the printer specified by the user. The port it tries is indeed the port “name” we see when looking at the printer’s properties. So that’s, uh, correct.

Except…wait a minute, what in the heck is a “port name”? It’s not a valid IP address (though it IS the IP address of the printer itself, prefixed with “IP_”. Nothing I can find on NET USE ever says anything about a printer port, only a computer/share [and optional volume].

Can anyone shed any light as to whether this could have EVER worked?

[Of course, no one can provide us with the source for the version of the service that actually still works. We’ve not touched this portion of the service, only what precedes this printing. And the client swears they haven’t either. Grrr…]

We are looking at a more modern way of printing, though the fact that it needs to run as a service complicates things.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:09:54+00:00Added an answer on May 18, 2026 at 8:09 pm

    The “IP_1.2.3.4” parameter is the printer share name, not a port name. You must have shared one of the existing installed printers giving it the name “IP_1.2.3.4” at some point in the past, and this share name is missing.

    If you just need a passthrough printer, you can install the “Generic/Text Only” printer, assign it to the desired port, and share it using the name in your “net use” command.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A few years back, another clever programmer set up a VB.NET service to print
I am getting back into a bit more .NET after a few-years of not
I discovered ASP.NET profiles a few years back and found it quick and easy
A few years ago I've installed several SVN plugins for eclipse. At the time
In an application I wrote a few years back I use function SystemParametersInfo with
I remember seeing a poster a few years back that had a nice break
A few years back I worked in a Sybase/Delphi environment, using the BDE to
I remember a few years back, I used a program that was capable of
I want to retrieve old Google searches which I did a few years/months back
A few years ago, I read a book that described how you could override

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.