Sign in with
Sign up | Sign in
Your question
Closed

Adding Desktop shortcut and Icon using a GPO logon script

Last response: in Windows XP
Share
February 3, 2010 1:08:40 PM

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
May 20, 2010 10:19:47 PM

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.
Score
0
November 29, 2011 4:31:35 PM

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?
Score
0
Related resources
November 29, 2011 9:12:07 PM

'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()
Score
0
November 30, 2011 10:31:31 AM

Thank you!
Score
0
!