1 2 Previous Next 15 Replies Latest reply on Nov 26, 2012 9:58 AM by jplung

    Trying to push a desktop icon to all users

    Rookie

      Hello All,

       

      This is probably a really simple question although I am not that knowledgeable on scripting nor pushing batch files through LANDesk, but we are trying to put a web icon on all of our employee desktops. I am sure there may be a better way to do this, if so please let me know but here is how I did it.

       

      I created a batch script:

       

      xcopy "\\servername\Network Support\Software\Point 11 Browser\Point 11.Ink" c:\users\public\desktop

       

      and then created my batch script distribution package pointing to the folder the batch script is in and then creating the scheduled task. I drag my computer in for testing and it fails with error code 4.

       

      This is the log I get when the job fails:

       

      Processing package : Point 11 Icon
      Thu, 18 Aug 2011 08:35:45 File (\\servername\software$\Batch_Files\Point11.bat) is not in cache
      Thu, 18 Aug 2011 08:35:47 Performing TCP connection with a timeout of -1 milliseconds
      Thu, 18 Aug 2011 08:35:49 ILdDownloading file to C:\Program Files\LANDesk\LDClient\sdmcache\ldlogon\FileLists\taskmanifest.PRDLANDESK.38.21.ini, attempt 0
      Thu, 18 Aug 2011 08:35:51 ILdDownloadFile returned 0
      Thu, 18 Aug 2011 08:35:51

       

      Downloading file \\servername\software$\Batch_Files\Point11.bat (lH8Jba+otz6qY5/g4CNO/g==, 3)
      Thu, 18 Aug 2011 08:35:51 Downloading file 1 of 1 from '\\servername\software$\Batch_Files\Point11.bat'
      Thu, 18 Aug 2011 08:35:51 processing of package is complete, result 229392397 (0x0dac400d - code 16397)

       

      Thu, 18 Aug 2011 08:35:51 File (\\servername\software$\Batch_Files\Point11.bat) is cached locally
      Thu, 18 Aug 2011 08:35:51 ILdDownloading file to C:\Program Files\LANDesk\LDClient\sdmcache\ldlogon\FileLists\taskmanifest.PRDLANDESK.38.21.ini, attempt 0
      Thu, 18 Aug 2011 08:35:53 ILdDownloadFile returned 0
      Thu, 18 Aug 2011 08:35:53

       

      Downloading file \\servername\software$\Batch_Files\Point11.bat (lH8Jba+otz6qY5/g4CNO/g==, 3)
      Thu, 18 Aug 2011 08:35:53 Downloading file 1 of 1 from '\\servername\software$\Batch_Files\Point11.bat'
      Thu, 18 Aug 2011 08:35:53 Batch file Client Thread
      Thu, 18 Aug 2011 08:35:53 PackagePath:     [\\servername\software$\Batch_Files\Point11.bat]
      Thu, 18 Aug 2011 08:35:56
      Thu, 18 Aug 2011 08:35:56 Installation result 8DB50004

      Thu, 18 Aug 2011 08:35:58 processing of package is complete, result -1917517820 (0x8db50004 - code 4)

       

      Thanks in advance!

        • 1. Re: Trying to push a desktop icon to all users
          EMiranda Expert

          it could be possible that the local system account does not have access to that share.  What i would do is include the Point 11.Ink as an additional file in your package. and then change your patch file to just

           

          xcopy "Point 11.Ink" c:\users\public\desktop

           

          if it is still giving you errors, pipe out the actions in your batch file and see what the log file like this

           

           

          xcopy "Point 11.Ink" c:\users\public\desktop > C:\copylog.txt

          1 of 1 people found this helpful
          • 2. Re: Trying to push a desktop icon to all users
            ahe Expert

            Additionally to write a local log, you could send a message to LANDesk Scheduled Task:

             

            %programfiles%\landesk\ldclient\sdclient.exe /msg=...

             

            Take a look in this doc:

            About Batch File Distribution Packages

             

            Regards

            Axel

            • 3. Re: Trying to push a desktop icon to all users
              Apprentice

              You may want to try to "quote" out the destination of the file as well.    "c:\users\public\desktop"

              • 4. Re: Trying to push a desktop icon to all users
                Rookie

                Just an update, I am still trying to get the script to work properly. I am still getting the error 4 message so not sure what is going on. I tried all the suggestions posted and I am currently going through the batch script document to see if there is another way to do this or if I am doing something wrong.

                 

                Permissions seem to be alright as domain computers are added to the folder structure leading up to and including the folder where the batch scripts are sitting.

                • 5. Re: Trying to push a desktop icon to all users
                  EMiranda Expert

                  do you have UAC enabled, maybe that is blocking it?

                  • 6. Re: Trying to push a desktop icon to all users
                    Rookie

                    That is a very good point, UAC is enabled.

                     

                    Is there any way to use a psexec command within a batch script? Usually I have used psexec to execute a script but never within one. I know psexec will bypass UAC.

                    • 7. Re: Trying to push a desktop icon to all users
                      EMiranda Expert

                      yes, just include psexec.exe with your additional files.

                       

                      then add the command to your batch file like:

                       

                      PsExec.exe -s -i xcopy "Point 11.Ink" c:\users\public\desktop

                       

                       

                      that will run interactively as local system.  the list of switches you can use are here:

                       

                       

                      http://technet.microsoft.com/en-us/sysinternals/bb897553

                      • 8. Re: Trying to push a desktop icon to all users
                        EMiranda Expert

                        also note, that depending on what version of pstools you have, you may have to add  /accepteula switch so you dont get the eula pop up.

                        • 9. Re: Trying to push a desktop icon to all users
                          MrGadget Expert

                          I'm having the same problem. Itryed both suggestions of Emiranda and still didn't work.

                          Heres what I did :1. Set package to use .bat file with a Xcopy adobeX.lnk c:\users\default\desktop then add shortcut, terms.lnk as additional file.  It copies both to sdmcache\ldlogon\packages\shortcut. It never copies shortcut to desktop.

                          2. Put the Psexec line in bat file and added shortcut and psexec to additional files. It copies them to sdmcache\ldlogon\shortcut. It never copies terms.lnk to desktop.

                          3. Ran the psexec line from the sdmcache\ldlogon\packages\shortcut directory it gives a something not recognized error.

                          4. Ran a psexec -s -i -cmd from \sdmcache\ldlogon\packages\shortcut directory. It opens a System command window. Ran the bat file with the Xcopy terms.lnk c:\users\default\desktop and it works.

                          It just won't work running through a Landesk package.

                          I am running the job as a Push.  Delivery as a push at full bandwidth under system account.

                          • 10. Re: Trying to push a desktop icon to all users
                            ahe Expert

                            Hello,

                             

                            the sysinternals tools need a first time registration by every user. If you start them manually, you'll get the hint to accept EULA.

                            If you want to hide this popup, you've to add a registry entry for the user before:

                             

                            [HKEY_CURRENT_USER\Software\Sysinternals\PsExec]
                            "EulaAccepted"=dword:00000001

                             

                            Or you can start psexec with parameter -accepteula

                             

                            http://forum.sysinternals.com/eula-prompt-when-running-pstools_topic8783_page8.html

                             

                            Regards

                            Axel

                            • 11. Re: Trying to push a desktop icon to all users
                              Apprentice

                              I believe you could use Link Management to add an icon to the desktop.  Select Distribution and then Link Management then make a new link to your app and specify the desktop as a target instead of the LaunchPad.

                              • 12. Re: Trying to push a desktop icon to all users
                                MrGadget Expert

                                I got it to work. Here's what I found (besides some of my own mistakes).

                                The C:\Users\Public\Public Destop folder is Hidden.(I had previously put in the Users\default path but that was the wrong one)

                                Xcopy will not copy (according to Microsoft) to a hidden folder.

                                After doing some more googling I found out the \Public Desktop is a alias. Its real name is Desktop.

                                After substituting C:\Users\Public\Desktop my Xcopy adobe shortcut copied ok.

                                I used a Push and download from source full bandwidth. (system account)  By the way no user was logged in, it was at the Ctrl alt del screen.

                                Also the bat file was first and the shortcut was put as a additional file. Both bat file and shortcut are stored in same folder on server.

                                My bat file

                                @echo on

                                xcopy "adobe reader X.lnk" "c:\users\public\desktop\"                        Note; make sure last \ is after desktop or it will fail

                                 

                                Hope this helps someone else.

                                • 13. Re: Trying to push a desktop icon to all users
                                  Rookie

                                  I used the Link Management option and selected desktop as the target. When I run the job, it goes to active, drops back into pending and has a status of waiting with the result of "Policy has been made available" Is this normal? Do I need to trigger something on the client computer for the link to show up?

                                  • 14. Re: Trying to push a desktop icon to all users
                                    Apprentice

                                    All Launchpad Links are Policy triggered. If you open the Desktop manager it will trigger policy sync and the job should be executed.

                                     

                                    Launchpad is in my opinion the easiest way to place web page links on the desktop.

                                     

                                    If your Agent does not have the Desktop Manager in the start Menu you can trigger it from LDClient\DesktopManager.exe

                                     

                                    As we do not personally use Launchpad in our Company I am not 100% sure if the Agent Configuration has to be built with Launchpad in it for the Link Management to work but I am pretty sure it is not teh case.

                                    1 2 Previous Next