Closed

Adding Desktop shortcut and Icon using a GPO logon script

Hi,
I need to add a short cut with a specific icon to user's desktops.
I created a simple batch file and placed it in a GPO under the computers configuration scripts/startup.
The shortcut I needed was already in the users IE favorites. I copied the shortcut and placed it in the netlogon share for the domain.
the batch file is this:If Not Exist "C:\Documents and Settings\All Users\Desktop\Quantros.url" copy \\Mydomain\netlogon\Quantros.url"c:\Documents and settings\All users\Desktop"
The short cut get's copied to all desktops, I've tested that and it works. When I log into a workstation with an account that has administrative privileges, the correct icon is associated with the short cut. when I log in with a regular user account, the short cut is there, and it takes me to the correct url, but it just has a generic IE icon associated with the short cut.
I've checked the permissions on the All Users Profile and all users have read read/execute permissions.
Does anyone have any idea as to why this is happening. I'm pretty sure it's got to be a permissions issue, when I add the regular user account to the local admin group on the workstation, the correct icon appears, I need to have the correct icon without giving all users admin rights to the workstations.
Thanks
4 answers Last reply
More about adding desktop shortcut icon logon script
  1. Were you ever able to figure this out? I am having the same problem. I have tried copying the .ico file to the users computer and then copying the shortcut. The shortcut appears as the generic "E" and not the customized icon i want.
  2. js1510 said:
    Were you ever able to figure this out? I am having the same problem. I have tried copying the .ico file to the users computer and then copying the shortcut. The shortcut appears as the generic "E" and not the customized icon i want.

    I am having the same issue. Did anyone find anything out?
  3. 'This Script will place a shortcut on a user's desktop
    'and change the Icon File associated with the shortcut

    set objFSO=CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("WScript.Shell")
    sUserProfile=CreateObject("WScript.Shell").ExpandEnvironmentStrings("%UserProfile%\")
    sUserDesktop = objShell.SpecialFolders("Desktop")

    'Modify Variables in this section
    IconSourceFile= "\\SERVER\netlogon\ICONFILE.ico" 'Source file for display icon
    IconFolder=sUserProfile & "\Icons\" 'Folder that the IconSourceFile will be copied to (c:\documents and settings\%username%\ICONS)
    IconFile= "ICONFILE.ico" 'Icon File Name (to be saved on local computer)
    ShortcutName= "\SHORTCUT NAME.lnk" 'Name of the Shortcut to appear on Desktop
    URL= "http://WWW.GOOGLE.COM" 'URL/Webaddress

    IF NOT objFSO.FileExists (IconFolder & IconFile) Then
    IF NOT objFSO.FolderExists (IconFolder) Then
    objFSO.CreateFolder (IconFolder)
    End if
    objFSO.CopyFile IconSourceFile, IconFolder, TRUE
    End If
    Set objShortcutUrl = objShell.CreateShortcut(sUserDesktop & ShortcutName)
    objShortcutUrl.TargetPath = URL
    objShortcutUrl.IconLocation = IconFolder & IconFile
    objShortcutUrl.Save
    wscript.quit()
  4. Thank you!
Ask a new question

Read More

Configuration Internet Explorer Desktops Windows XP