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

x
?
Solved

Mapping network drive in login script

Posted on 2008-10-15
5
Medium Priority
?
1,295 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 160 total points
ID: 22727507
net use H: \\servername\sharename
0
 
LVL 2

Assisted Solution

by:EL-SHIMY
EL-SHIMY earned 160 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 160 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Many admins will agree: WSUS is is a nice invention but using it on the client side when updating a newly installed computer is still time consuming as you have to do several reboots and furthermore, the procedure of installing updates, rebooting an…
Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
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…
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…

721 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