Solved

Map \\Server\Users\User1 with %Username%

Posted on 1998-12-01
12
1,114 Views
Last Modified: 2013-12-19
The senario looks as follow:
\\Server\Users\User1 has a file File.exe and a dir. Documents.
I want to Map \\Server\Users\User1 by writing Net Use H: \\Server\Users\%Username%
then h: looks:
H:\
-\Documents
-File.exe
and NOT
H:\User1\
-\Documents
-File.exe
How do I do??
Rickard
0
Comment
Question by:Udden
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
  • +3
12 Comments
 
LVL 23

Expert Comment

by:Tim Holman
ID: 1566489
Udden,
  It's working as designed.
  If you want to go up another level, the only way is to type NET USE H: \\SERVER1\USERS then CD into the directory you want.
  However, you could put this in your logon script :

NET USE H: \\SERVER1\USERS
CD H:\%USERNAME%

  ..or put another level in your directory sructure - ie \\SERVER1\USERS\User1\User1.

Tim
0
 
LVL 1

Expert Comment

by:bphillips
ID: 1566490
You can't.  If you use \\servername\sharename\%username% then it will create a folder in that share with full control ntfs permissions for that person.  If you use \\servername\%username% you will get the required results, but you must create the folder and share yourself.
0
 
LVL 5

Expert Comment

by:carmine
ID: 1566491
If the clients are NT Workstation (not W95) you can use the SUBST command:

SUBST H: \\Server\Users\%Username%
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Author Comment

by:Udden
ID: 1566492
Yes that work but you need a script!
/Rickard
0
 

Author Comment

by:Udden
ID: 1566493
I don't want scripts!!
0
 

Author Comment

by:Udden
ID: 1566494
Strange? It looks like I have 2 answers.
Thats how it become two "No Scripts".

0
 
LVL 2

Accepted Solution

by:
mbreuker earned 200 total points
ID: 1566495
Here is another option for you:

Share each users directory as a "hidden" share. To make it hidden, just add a $ sign at the end of the share name. For instance, to share \\<servername>\users\bob, you would name the share BOB$. Then you can type map H: \\<servername>\BOB$.

Of course this is a lot of administrative overhead if you need to do this for more than a handful of users. The "Microsoft solution" is to use the SUBST command, which only produces the desired result if the user is running NT workstation.

Sorry, the "net use <driveletter>" command is not as robust as Novell's "map" command. Maybe this will change soon. There are third party administrative tools that may allow you to do this. You are certainly not the first person to ask this question and it is actually a fairly common request on this thread.

0
 

Author Comment

by:Udden
ID: 1566496
"There are third party administrative tools that may allow you to do this." What and where?
/R
0
 
LVL 23

Expert Comment

by:Tim Holman
ID: 1566497
Have I understood your problem correctly ??

0
 

Expert Comment

by:sdczerno
ID: 1566498
This is how I usually do this.

Create a New User Template. Under Profile, in the login script field type login.bat. In the Home directory choose connect drive letter H: to \\servername\%username%. H for Home Directory.

Now I create a batch file like the following:

@echo off
if %OS% == Windows_NT goto winnt

:win
rem used for windows 3.11, 95 or 98
net use f: \\servername\fdrive
net use g: \\servername\gdrive
net use h: /home
net use i: \\servername\users
goto end

:winnt
net use f: \\servername\fdrive
net use g: \\servername\gdrive
rem net use h: /home Windows NT Workstation or Server does this for you
net use i: \\servername\users

:end

Save batch file as login.bat.
copy the batch file to \winnt\system32\repl\scipts\import

Now, I create a share name for that user the same as their user name(ex. User Name=JOHN, Share Name=JOHN) under the directory USERS which is shared as USERS.

Hope this helps.
0
 

Author Comment

by:Udden
ID: 1566499
No. You have to share all the users directory! If you have 120 users it becomes timeconsumming!
But I like the script, it gave me one idé.
/Rickard
0
 

Expert Comment

by:sdczerno
ID: 1566500
But the answer you accepted had you share a driectory too. Using his way you cannot even use %username% when creating a new user. Did you implement his answer?
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month7 days, 12 hours left to enroll

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question