Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 1998-12-01
12
Medium Priority
?
1,123 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
Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

 

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 600 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

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

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

Downtime reduced, data recovered by utilizing an Experts Exchange Business Account Challenge The United States Marine Corps employs more than 200,000 active-duty Marines with operations in four continents, all requiring complex networking system…
We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
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…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

730 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