Solved

group policies for mapped network drive shortcuts on desktop?

Posted on 2006-06-14
7
386 Views
Last Modified: 2010-04-18
Hi,

I would like to setup a group policy (I am assuming this is the easiest way) that will force a mapped network drive shortcut on every users desktop.

Currently, when a user logs onto the network, a logon batch file runs that connects the user to the two mapped network drives. Now, I would like to have the two mapped network drives forced to the users desktop as shortcuts. I would like be able to name the shortcuts, H drive and Z drive. The user should not be able to remove or move the shortcuts from the desktop. Finally, and not as important, I would like be able to position the shortcuts on the top-middle of the screen/desktop.

Can anyone give me a step-by-step breakdown on how I can set this up?

Thanks!
0
Comment
Question by:afoedit
  • 2
  • 2
7 Comments
 

Author Comment

by:afoedit
ID: 16905232
Anyone?
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 16907676
how are you with scripting......this is going to be a scripting task
0
 

Author Comment

by:afoedit
ID: 16911041
i understand scripting. i have a background in programming. but, i am not familiar with windows scripting. could you get point me in the right direction?

thanks!
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 16916763
i have 0 background in anything except networking :) create a script to map your drives using the net use command.

then you will have to maybe post in the VB topic area and get some help on how to create a shortcut with vbs, i apologise for such a vague answer, just didnt want to leave your Q hanging open :)
0
 
LVL 26

Accepted Solution

by:
Pber earned 500 total points
ID: 16985970
This script will create your shortcuts:

Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
Dim MyShortcut, MyDesktop, DesktopPath
DesktopPath = WSHShell.SpecialFolders("Desktop")
'DesktopPath = "C:\Documents and Settings\All Users\Desktop"
Set MyShortcut = WSHShell.CreateShortcut(DesktopPath & "\H Drive.lnk")
MyShortcut.TargetPath = WSHShell.ExpandEnvironmentStrings ("\\server\H-share")
MyShortcut.WorkingDirectory = WSHShell.ExpandEnvironmentStrings("\\server\H-share")
MyShortcut.WindowStyle = 1
MyShortcut.IconLocation = WSHShell.ExpandEnvironmentStrings ("c:\windows\system32\shell32.dll, 9")
MyShortcut.Save

Set MyShortcut = WSHShell.CreateShortcut(DesktopPath & "\Z Drive.lnk")
MyShortcut.TargetPath = WSHShell.ExpandEnvironmentStrings ("\\server\Z-share")
MyShortcut.WorkingDirectory = WSHShell.ExpandEnvironmentStrings("\\server\Z-share")
MyShortcut.WindowStyle = 1
MyShortcut.IconLocation = WSHShell.ExpandEnvironmentStrings ("c:\windows\system32\shell32.dll, 9")
MyShortcut.Save

I'll have to see about the icon locations
0

Featured Post

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.

Join & Write a Comment

by Batuhan Cetin In this article I will be guiding through the process of removing a failed DC metadata from Active Directory (hereafter, AD) using the ntdsutil tool in a Windows Server 2003 environment. These steps are not necessary in a Win…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

746 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

12 Experts available now in Live!

Get 1:1 Help Now