Desktop Shortcuts

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using DFS to maintain the appropriate shares and I even configured each
user to map this drive through AD users. Now I would like to make a desktop
shortcut to this mapped drive but I'm at a loss as to where to do this. I
wasn't sure if this was a group policy issue or what. ANy help would be
appreciated.

Jeff
 
one way is to creat the shortcut (use variables like %username% if you can),
put it on a network location, and copy it via a logon script to the user
desktop.
 
Unfortunately my scripting skills are not great although I've been wanting to
work on this skill. Any direction would be appreciated.

Jeff
 
To copy a file from the same folder as a script to a user's desktop (assuming
the script is being run by the user) you would use something like this:

set objFso=createObject("scripting.fileSystemObject")
set objWShell=wScript.createObject("WScript.Shell")

usrName=objWShell.expandEnvironmentStrings("%USERNAME%")

strFileToCopy="shortcut.lnk"
strFolder="C:\Documents and Settings\"&usrName&"\Desktop"

if objFso.folderExists(strFolder) then
objFso.copyFile strFileToCopy,strFolder&"\",true
end if


Be careful of line wraps...


--

Paul Williams

http://www.msresource.net
http://forums.msresource.net
 
Thanks - I'll try that one.

ptwilliams said:
To copy a file from the same folder as a script to a user's desktop (assuming
the script is being run by the user) you would use something like this:

set objFso=createObject("scripting.fileSystemObject")
set objWShell=wScript.createObject("WScript.Shell")

usrName=objWShell.expandEnvironmentStrings("%USERNAME%")

strFileToCopy="shortcut.lnk"
strFolder="C:\Documents and Settings\"&usrName&"\Desktop"

if objFso.folderExists(strFolder) then
objFso.copyFile strFileToCopy,strFolder&"\",true
end if


Be careful of line wraps...


--

Paul Williams

http://www.msresource.net
http://forums.msresource.net
 
Back
Top