net use command

D

ddimarzio

I have windows xp installed on all my pc's and on several
of them all of a sudden I can't print to a networked
printer from a dos based program. I can print to screen
but not to the network printer. The way I check to see if
the connection is ok, I goto the Dos prompt and type:
net use lpt1 \\server\printer

when I type: net I get an error:
"net is not recognized as an internal or external command
or program or batch"

Any ideas. I tried replacing the net.exe and net.hlp
files but that did not fix the problem.

thanks for any ideas.
 
S

Setec

Check your path. You should have a statement in there for
C:\WINNT\System32. That is where your net.exe lives.
 
H

hkallen

This may help you:

NET USE Connects or disconnects your computer from a shared resource o
displays information about your connections.
NET USE [drive: | *] [\\computer\directory [password | ?]]
[/SAVEPW:NO] [/YES] [/NO]
NET USE [port:] [\\computer\printer [password | ?]]
[/SAVEPW:NO] [/YES] [/NO]

NET USE drive: | \\computer\directory /DELETE [/YES]
NET USE port: | \\computer\printer /DELETE [/YES]
NET USE * /DELETE [/YES]

NET USE drive: | * /HOME

drive Specifies the drive letter you assign to a shared directory.
* Specifies the next available drive letter. If used with /DELETE
specifies to disconnect all of your connections.
port Specifies the parallel (LPT) port name you assign to a share
printer.
computer Specifies the name of the computer sharing the resource.
directory Specifies the name of the shared directory.
printer Specifies the name of the shared printer.
password Specifies the password for the shared resource, if any.
? Specifies that you want to be prompted for the password of the share
resource. You don't need to use this option unless the password i
optional.
/SAVEPW:NO Specifies that the password you type should not be saved i
your password-list file. You need to retype the password the next tim
you connect to this resource.
/YES Carries out the NET USE command without first prompting you t
provide information or confirm actions.
/DELETE Breaks the specified connection to a shared
resource.
/NO Carries out the NET USE command, responding with NO automaticall
when you are prompted to confirm actions.
/HOME Makes a connection to your HOME directory if one is specified i
your LAN Manager or Windows NT user account.

To list all of your connections, type NET USE without options.


*I have windows xp installed on all my pc's and on several
of them all of a sudden I can't print to a networked
printer from a dos based program. I can print to screen
but not to the network printer. The way I check to see if
the connection is ok, I goto the Dos prompt and type:
net use lpt1 \\server\printer

when I type: net I get an error:
"net is not recognized as an internal or external command
or program or batch"

Any ideas. I tried replacing the net.exe and net.hlp
files but that did not fix the problem.

thanks for any ideas.


-
hkalle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top