Solved

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

Posted on 1998-12-01
12
1,106 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
Resolve DNS query failed errors for Exchange
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

752 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