Solved

Mapping network drive in login script

Posted on 2008-10-15
5
1,283 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now