I currently have the following script to create a ShortCut on certain users desktops:
Option Explicit
Dim objShell, objDesktop, objLink
Dim strAppPath, strWorkDir, strIconPath
' --------------------------------------------------
' Here are the variables that to change if you are making a 'real' script
strWorkDir = "C:\Database"
strAppPath = "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE""" & " ""C:\Database\DB.mdb"" " & "//WRKGRP" & " ""\\Server1\DB\DB1\Secured.mdw"
strIconPath = "%ProgramFiles%\Microsoft Office\OFFICE11\MSACCESS.EXE,5"
Set objShell = CreateObject("WScript.Shell")
objDesktop = objShell.SpecialFolders("Desktop")
Set objLink = objShell.CreateShortcut(objDesktop & "\Database.lnk")
' ---------------------------------------------------
' Section which adds the shortcut's key properties
objLink.Description = "WordProcess"
objLink.HotKey = "CTRL+SHIFT+X"
objLink.IconLocation = strIconPath
objLink.TargetPath = strAppPath
objLink.WindowStyle = 3
objLink.WorkingDirectory = strWorkDir
objLink.Save
WScript.Quit
' End of creating a desktop shortcut
For some reason, the strAppPath data gets changed in the shortcut. The switch /WRKGRP gets switched to \WRKGRP and the location of the security file gets switched to \Server1\DB\DB1\secured.mdw.
Any suggestions on preventing these changes? I know I am just overlooking something on the script. Oh, and I am using a Group Policy Loopback - Merge Mode on the Users Configuration/Windows Settings/Scripts/Logon for an OU of specific computers.
Thanks,
Chris