Computing.Net > Forums > Windows NT > Net Use Command

Net Use Command

Reply to Message Icon

Original Message
Name: Ahamed Kaize
Date: December 4, 2001 at 08:42:26 Pacific
Subject: Net Use Command
Comment:

I am have a machine with a network card installed with Windows NTWS 4.0 machine is named as SERVER [not connected to any other computers]

Can I map the local folders like in Novell/DOS using the NET USE command and how?

For example I have 2 folder like DATA and PROS I have to be mapped these folders while booting
G:\ = DATA folder
K:\ = PROG Folder

Thanks


Report Offensive Message For Removal


Response Number 1
Name: David
Date: December 4, 2001 at 08:56:25 Pacific
Reply: (edit)

Make a Batch file.
Name it netdriv.bat
paste in there the following 3 lines:
@echo off
net use g: \\server\data
net use K: \\server\prog

Save it in the start menu in the folder called startup.

enjoy.
David


Report Offensive Follow Up For Removal

Response Number 2
Name: Ahamed Kaize
Date: December 5, 2001 at 00:34:15 Pacific
Reply: (edit)

Thanks for the info.
We are using a $ next the the folder sharing nane like DATA$ PROG$ in order to hide these folders with a normal operations.

Without these $ your bat file works fine, but with $ No way.

Can you please get me a solution?



Report Offensive Follow Up For Removal

Response Number 3
Name: Nick
Date: December 8, 2001 at 05:03:48 Pacific
Reply: (edit)

You could also try this

subst g: c:\data

but i'm not sure if it is supported in NTWS 4.0. - Works in XP 98 and 2000 though.

for more info type subst /? at command prompt.


Report Offensive Follow Up For Removal

Response Number 4
Name: pranav
Date: January 23, 2002 at 06:27:30 Pacific
Reply: (edit)

i have the net use on start up but how do i edit the batch file so that I don't have to enter password evertime.



Report Offensive Follow Up For Removal

Response Number 5
Name: Robert Bell
Date: March 5, 2002 at 01:39:40 Pacific
Reply: (edit)

Try using the following syntax to add passwords.

net use x: \\server\folder password /USER:user

You can also use the following switch with Win2000 to stop windows trying to reconnect the drives at stratup, before your batch runs..

/PERSISTENT:NO

To further tidy up the output, add the following to the end of each net use command..

> nul

Then add the follwoing line to give a summary of all drives mapped by the batch..

net use


Hope this helps.


Report Offensive Follow Up For Removal


Response Number 6
Name: Dan
Date: March 31, 2002 at 05:11:27 Pacific
Reply: (edit)

Question:
in process of migrating from Novell to 2000 OS. Created Login scripts for all users. Pretty much all is fine. However, when it comes to user home folders running into problem. I do not store home directories on a traditional filse server, but a SNAP server.
In the Novell Login:
MAP H: \\Snapserver\CN
(The CN refered to login names for the context of this issue)
For Windows 2000 DOM login (using ADS):
Net Use H:\\snapserver\%username%

I also have specific mappings to other shares on SNAP, ie. A Prodoffice share.

Now when run, all the specific, static named shares map without problem.

The %username% variable acts differently. It seems to work correctly when run on a win2000 Pro WS. However when run on a 95/98 machine, I get the following (sorry going by memory)

net use H:\\snapserver\
there is a problem with the syntex

I verified that rights were correct. I also reviewed the login script (and compared the same login script on a 2000 vs 98 machine...and while this was a brief comparision, I feel there is a relation to the WS OS)
Also, when I did a net use /? on both WS OS, there were differences... But after a 12 hour day and running late for a dinner I had to pull the plug.
Any thoughts, suggestions? I intend on updating all WS to 2000 but I will be pulling the plug on the Novell sooner than that, and was hoping to come up with a better way than individual login scripts. Thanks a lot!! Dan



Report Offensive Follow Up For Removal

Response Number 7
Name: Mark
Date: April 3, 2002 at 13:37:02 Pacific
Reply: (edit)

I am using the net use command to capture printer ports so dos based programs can run in W2K. I have gone an extra step to map the printer using the users computer as the server. The problem with this is that when you lok at the available printers list, it lists everyone.
Is there a way to map a printer and have it hidden from everyone else?


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Net Use Command

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge