Solved

Mapping network drive in login script

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

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

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

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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…
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…
Suggested Courses

623 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