Results 1 to 8 of 8

Thread: network printer again

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    italy
    Posts
    5

    network printer again

    Hi! This is a dos command that i use in my c program

    C:\>net use \\wanda\ntlps lpt3:

    where "wanda" is the server name and "ntpls" is the network printer.

    This statement works fine but for a network printer which has some blanks in the name how do i write?

    Ex: C:\>net use \\wanda\hp laserJet 6 lpt3:

    (i tried also with C:\>net use "\\wanda\hp laserJet 6 lpt3:" but it dosn't work).

    Thanks.

    Chiara

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    C:\>net use "\\wanda\ntlps" lpt3:
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    italy
    Posts
    5
    :-( it doesn't work for name with blanks inside

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You should just need quotes round the device name, not the entire command line :-/

    Try single quotes.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    net use "\\wanda\hp laserJet 6" lpt3:
    This should work
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Or use the DOS name:
    net use \\wanda\hplase~1 lpt3:

    Not sure if that works on 2k though
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    italy
    Posts
    5
    For parksie:
    yes, i tried C:\>net use "\\wanda\hp laserJet 6" lpt3:
    and it doesn't work.
    it's been my error on typing the first message, sorry.

    For cornedBee:
    Now i'm gonna try your suggestion.

    Thank you both.

    Chiara

  8. #8

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    italy
    Posts
    5
    ok, it's simply this:

    net use \\wanda\hplaserjet6 lpt3:

    :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width