Re: Use Group Policy to deploy a Desktop shortcut

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Ralf,

Das stimmt!

--
Cary W. Shultz
Roanoke, VA 24012

"Ralf Wigand" <wigand@xxxxxxxxxxxxxxxxxxx> wrote in message
news:OYIHOg7MGHA.1760@xxxxxxxxxxxxxxxxxxxxxxx
as a user of german XP, I would prefer the following line:


' An example of using environment variables when copying files.
' In this script a shortcut 'shortcut.lnk' is copied to the desktop
' of the %username% user profile.

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"

strFolder=objWShell.SpecialFolders.item("Desktop")

(in german versions it is called Dokumente und Einstellungen :-)


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

--
Paul Williams
Microsoft MVP - Windows Server - Directory Services
http://www.msresource.net | http://forums.msresource.net



ciao, ralf



.



Relevant Pages

  • Re: Use Group Policy to deploy a Desktop shortcut
    ... The following example script should be configured as a GPO logon script: ... ' An example of using environment variables when copying files. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Use Group Policy to deploy a Desktop shortcut
    ... ' An example of using environment variables when copying files. ... ' In this script a shortcut 'shortcut.lnk' is copied to the desktop ... (in german versions it is called Dokumente und Einstellungen :-) ...
    (microsoft.public.windows.server.active_directory)
  • Re: Common Desktop Icons for multiple users
    ... scripts. ... ' An example of using environment variables when copying files. ... ' In this script a shortcut 'shortcut.lnk' is copied to the desktop ...
    (microsoft.public.windows.server.active_directory)
  • Re: help writting script to copy file to every desktop
    ... Then it will ping each computer to see if it is truly reachable. ... Here is a sample script that I use. ... Each shortcut is only 1KB each, so the extra replication traffic is nothing. ... You will get different methods, collections, and properties for a file than you will for a folder. ...
    (microsoft.public.scripting.vbscript)
  • Re: Findout shortcut from which script was launched ?
    ... apply the script to selected files. ... &Cmd window in this directory ... Context Cmd window.lnk shortcut has the following properties set: ... and when selecting a file or several, selecting Send To the script in the ...
    (microsoft.public.scripting.vbscript)