|
-
Oct 24th, 2002, 07:39 AM
#1
Thread Starter
New Member
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
-
Oct 24th, 2002, 08:00 AM
#2
Monday Morning Lunatic
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
-
Oct 24th, 2002, 08:10 AM
#3
Thread Starter
New Member
:-( it doesn't work for name with blanks inside
-
Oct 24th, 2002, 08:13 AM
#4
Monday Morning Lunatic
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
-
Oct 24th, 2002, 08:45 AM
#5
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.
-
Oct 24th, 2002, 08:46 AM
#6
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.
-
Oct 24th, 2002, 09:18 AM
#7
Thread Starter
New Member
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
-
Oct 24th, 2002, 09:51 AM
#8
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|