Solved

Mapping network drive in login script

Posted on 2008-10-15
5
1,289 Views
Last Modified: 2012-05-05
I need to know how to map network drive in login script and i need to map login user folder too.
0
Comment
Question by:Charlie1025
[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 Comments
 
LVL 14

Accepted Solution

by:
Kutyi earned 40 total points
ID: 22727507
net use H: \\servername\sharename
0
 
LVL 2

Assisted Solution

by:EL-SHIMY
EL-SHIMY earned 40 total points
ID: 22727562
hi there
net use y: "\\Server-name\shared-folder" /persistent:yes
and if u u want to make it kinda dynamic up to login user
net use y: "\\Server-name\%UserName%" /persistent:yes
also
net use y:"\\<Server-name>\IPC$ "<PASSWORD>" /user:<USERNAME>

NET USE /?
NET HELP USE

put it on a file.txt and rename it ot file.cmd
and attach it to user or computer policy , or local script and start up programe

i hope that help :)
Shimy
0
 
LVL 6

Assisted Solution

by:JimsZ
JimsZ earned 40 total points
ID: 22730885
Create a .txt file and insert below lines.  Change your path, driveletters, etc.  Once complete, rename to a .vbs file


Dim objNetwork, strDriveLetter1, StrDriveLetter2
Dim strRemotePath1, strRemotePath2
Dim strnewname1, strnewname2


strDriveLetter1 = "Driveletter:" ' You need to change to drive letter such as F:
strDriveLetter2 = "Driveletter:" ' You need to change to drive letter such as G:

strRemotePath1 = "\\path1\pathfiles" ' You need to implement path to your share ex \\fileserver\share
strRemotePath2 = "\\path2\pathfiles" ' You need to implement path to your share ex \\fileserver2\share

strnewname1 = "Name of Share" ' You need to rename such as share1
strnewname2 = "Name of Share" ' You need to rename such as share2 (any name works

On Error Resume Next
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1
objNetwork.MapNetworkDrive StrDriveLetter2, strRemotePath2

Set objShell = CreateObject("Shell.Application")
objShell.NameSpace(strDriveLetter1).Self.Name = strNewName1
objShell.NameSpace(strDriveLetter2).Self.Name = strNewName2
0
 
LVL 4

Expert Comment

by:choswoot
ID: 22735975
Rename .txt to a .vbs file when downloaded
Download Xcacls @:
http://www.microsoft.com/downloads/details.aspx?familyid=7a3e2241-d7d0-42b6-b86e-6eda88726c01&displaylang=en
This is an automated version with NTFS permission setting.
Set up the server configs and test directly from your desktop.
I'm assuming you know how to do the GPO, if not;
http://www.petri.co.il/setting-up-logon-script-through-gpo-windows-server-2008.htm

MAPDrv.txt
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

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