Announcement

Collapse
No announcement yet.

How to put shortcut on users' desktops using GP?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to put shortcut on users' desktops using GP?

    Hi there!
    I have a little problem with GPO in 2K3 environment with XP SP2.

    Goal: using GP place to users' desktops a shortcut to network share on one of the file servers.

    Solution: Using GP User configuration -> Administrative templates -> Desktop -> Active Desktop -> Add/Delete Items I configured option Add Item: \\server\share1 \\server\share2

    It doesn't work. The rest part of definitions in this GPO works fine. The shares are accessible from the wks manualy - no problem.

    Any suggestion? Thank you in advance

  • #2
    Have you tried creating a shortcut to the share and then adding that to the desktop? (ie a .lnk file)
    Server 2000 MCP
    Development: ASP, ASP.Net, PHP, VB, VB.Net, MySQL, MSSQL - Check out my blog http://tonyyeb.blogspot.com

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

    Comment


    • #3
      Yes i did. It doesn't work as well.

      Comment


      • #4
        Add something like this to the logon scripts in the GPO applied to users:
        Code:
                 set WshShell = WScript.CreateObject("WScript.Shell")
                 strDesktop = WshShell.SpecialFolders("Desktop")
                 set oShellLink = WshShell.CreateShortcut(strDesktop & "\Network Share.lnk")
                 oShellLink.TargetPath = "\\server\share"
                 oShellLink.WindowStyle = 1
                 oShellLink.IconLocation = "explorer.exe, 0"
                 oShellLink.Description = "Network Share"
                 oShellLink.WorkingDirectory = "\\share\server"
                 oShellLink.Save
        http://msdn.microsoft.com/library/de...teshortcut.asp
        Guy Teverovsky
        "Smith & Wesson - the original point and click interface"

        Comment


        • #5
          How to put shortcut on users' desktops using Group Policy

          If you are creating a network shortcut on the desktop, I think it's better if you can set the icon that has the shape like network neighborhood one. Based on Guy's pasted code, you can also customize of how the icon should look. The location of the shell icon is "C:\WINDOWS\system32\SHELL32.dll"

          So I'll replace

          oShellLink.IconLocation = "explorer.exe, 0"

          with

          oShellLink.IconLocation = "SHELL32.dll, 18"

          This is the icon that I choose for that shortcut. There are many of them. you just need to pick one in 230 icons

          Teamwork

          Comment


          • #6
            Guy, Azmantek, thank you very much. It's working perfect and users just "happy" because they can't do nothing with the icon, next logon it's come back...

            Comment


            • #7
              Re: How to put shortcut on users' desktops using Group Policy

              Originally posted by azmantek
              If you are creating a network shortcut on the desktop, I think it's better if you can set the icon that has the shape like network neighborhood one. Based on Guy's pasted code, you can also customize of how the icon should look. The location of the shell icon is "C:\WINDOWS\system32\SHELL32.dll"

              So I'll replace

              oShellLink.IconLocation = "explorer.exe, 0"

              with

              oShellLink.IconLocation = "SHELL32.dll, 18"

              This is the icon that I choose for that shortcut. There are many of them. you just need to pick one in 230 icons

              how do you find the numbers of where the icon is, like in yours 0 and 18, how do u know which number represents to which icon?

              Comment


              • #8
                Re: How to put shortcut on users' desktops using Group Policy

                Originally posted by alcatron View Post
                how do you find the numbers of where the icon is, like in yours 0 and 18, how do u know which number represents to which icon?
                Check out this page http://www.mvps.org/serenitymacros/iconlist.html it shows them all.

                Comment


                • #9
                  Re: How to put shortcut on users' desktops using GP?

                  ...and for anyone out there who is interested in Vista, here's a sample of some:



                  And because shell32.dll has more, the image is bigger, so here's some icon indexes for shell32.dll
                  Best wishes,
                  PaulH.
                  MCP:Server 2003; MCITP:Server 2008; MCTS: SBS2008

                  Comment


                  • #10
                    Re: How to put shortcut on users' desktops using GP?

                    That's a great gif... what steps do I need to take to convert that into icons? Can I just clip out each GIF image and rename it *.ico? Or do I have to do some funky stuff to get this cool icon set on my XP desktop?


                    Tom
                    For my own and your protection, I do not provide support by private message under any circumstances. All such messages will be deleted and ignored.

                    Anything you say will be misquoted and used against you

                    Comment


                    • #11
                      Re: How to put shortcut on users' desktops using GP?

                      You guys do realise this thread is TWO years old!!
                      1 1 was a racehorse.
                      2 2 was 1 2.
                      1 1 1 1 race 1 day,
                      2 2 1 1 2

                      Comment


                      • #12
                        Re: How to put shortcut on users' desktops using GP?

                        Biggles77 - Martyh resurrected it and pointed us to a useful link so I just carried on with his thoughts. Is that OK? Some dogs just don't die...

                        Hi Tom,
                        If you want those icons on an XP desktop, you will need some software to snip out the image and make it into an ico file, renaming it won't do by itself. Have a search for some freebie or shareware icon creation packages.

                        All the best.
                        Best wishes,
                        PaulH.
                        MCP:Server 2003; MCITP:Server 2008; MCTS: SBS2008

                        Comment


                        • #13
                          Re: How to put shortcut on users' desktops using GP?

                          This worked fine for Windows XP, but my Windows 2000 machines are getting the target field cut off, which makes the shortcut invalid.

                          For example, I have the target defined as:

                          oShellLink.TargetPath = "G:\My4Websites\arehere\websites"

                          and on my Windows 2000 machine, it is showing the target as G:\My4Websi\arehere\websites

                          Here is the full copy of the code, which is in websites.wsf running as a logon script through Group Policy:

                          Code:
                          <package>
                          
                             <job id="vbs">
                          
                                <script language="VBScript">
                          
                                   set WshShell = WScript.CreateObject("WScript.Shell")
                          
                                   strDesktop = WshShell.SpecialFolders("Desktop")
                          
                                   set oShellLink = WshShell.CreateShortcut(strDesktop & "\Websites.lnk")
                          
                                   oShellLink.TargetPath = "G:\My4Websites\arehere\websites"
                          
                                   oShellLink.WindowStyle = 1
                          
                                   oShellLink.IconLocation = "shell32.dll, 4"
                          
                                   oShellLink.Description = "Websites"
                          
                                   oShellLink.Save
                          
                                </script>
                          
                             </job>
                          
                          </package>

                          Comment

                          Working...
                          X