jerrywalk1
asked on
create shortcut to users home drive
I need a simple script that will run in setup.bat when users log on that will take their U drive which is their home drives and create a desktop shortcut. Everyone uses the U drive as this is setup in the AD users profiles.
Windows 2003 R2
desktops/laptops windows 7
Windows 2003 R2
desktops/laptops windows 7
Create shortcut on desktop for mapped drives
http://social.technet.microsoft.com/Forums/windowsserver/en-US/6cd20b1b-8535-46f8-93f5-7aa65e6e17e6/create-shortcut-on-desktop-for-mapped-drives
http://social.technet.microsoft.com/Forums/windowsserver/en-US/6cd20b1b-8535-46f8-93f5-7aa65e6e17e6/create-shortcut-on-desktop-for-mapped-drives
ASKER
The network drive is already mapped. All i am trying to do is a script that will create a desktop shortcut to that drive letter.
Something like this? It would need a bit of tweaking as I do not know the location of the U drive in your network.
Set objFSO = CreateObject("Scripting.Fi leSystemOb ject")
Set objShell = CreateObject("WScript.Shel l")
DesktopPath = objShell.SpecialFolders("D esktop")
Set NewShortcut = objShell.CreateShortcut(De sktopPath & "\Udrive.lnk")
If Not objFSO.FileExists (NewShortcut) Then
NewShortcut.Description = "U Drive"
NewShortcut.IconLocation = "%SystemRoot%\system32\SHE LL32.dll,8 8"
NewShortcut.TargetPath = "\\server\locationofUdrive "
NewShortcut.Save
End If
Set objFSO = nothing
Set objShell = nothing
WScript.Quit
BB
Set objFSO = CreateObject("Scripting.Fi
Set objShell = CreateObject("WScript.Shel
DesktopPath = objShell.SpecialFolders("D
Set NewShortcut = objShell.CreateShortcut(De
If Not objFSO.FileExists (NewShortcut) Then
NewShortcut.Description = "U Drive"
NewShortcut.IconLocation = "%SystemRoot%\system32\SHE
NewShortcut.TargetPath = "\\server\locationofUdrive
NewShortcut.Save
End If
Set objFSO = nothing
Set objShell = nothing
WScript.Quit
BB
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
BB