Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drive map to local folder

Status
Not open for further replies.

mtbiker

MIS
Aug 23, 2001
126
US
I have a situation where a software vendor is requiring a mapped drive back to a folder on the local hard drive. My Netware environment is 5.1, but we have a good mix of 98 and win 2000pro workstation, along with a Terminal Server. I am pondering how to create an log-in script that would create a generic drive letter mapping to the same place on the local machines, even in the different OS environments.
 
I would say you can do it on your 2000 machines but not on 98. It would be a case of using NET USE to map a drive.

You could do something like the following in a batch file (don't think it will work in the login script):

IF "%OS%" = "Windows_NT" THEN
NET USE T: \\%COMPUTERNAME%\SHARENAME OR DRIVE
END

The %OS% field will check for the correct Operating System, then NET USE the T: (for example) to the local computer and share/drive. -----------------------------------------------------
"It's true, its damn true!"
-----------------------------------------------------
 
You can use the standard DOS SUBST command as follows

C:\Documents and Settings>help subst
Associates a path with a drive letter.

SUBST [drive1: [drive2:]path]
SUBST drive1: /D

drive1: Specifies a virtual drive to which you want to assign a path.
[drive2:]path Specifies a physical drive and path you want to assign to
a virtual drive.
/D Deletes a substituted (virtual) drive.

Type SUBST with no parameters to display a list of current virtual drives.
 
Thanks,

I think I got it to work.

I can't wate for the day the software vendors take into account silly stuff like this in their programmin.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top