3 Replies Latest reply on May 26, 2009 4:54 AM by zman

    deploy wallpaper to all PC

    Rookie

      Guys I need help

      I need some help about deploying wallpaper to all client’s PC via LANDesk

       

      please help me

        • 1. Re: deploy wallpaper to all PC
          egarlepp Employee

          This might be easiest by creating a custom vulnerability in patch manager and specifying the file to copy down to the systems or by packaging it up as an exe using the landesk packager software(Package Builder found on core in Management Suite\Tools directory i believe) and deploying out via software delivery. You can also use built in LD scripting to copy the file down or create a bat file to do the same.  LD Scritpting has a step by step gui to create a file copy script.

           

          If you are looking to set that wallpaper for the systems as well, you will need to make changes to the registry to have it set.  This can be done easier with a custom vulnerability.  This link gives you the keys that need to be set to do that - http://www.pctools.com/guides/registry/detail/1097/

           

           

          Hope this helps...

          1 of 1 people found this helpful
          • 2. Re: deploy wallpaper to all PC
            Apprentice

            Hi Muhammad,

                       

            Try this out !!

                            

            http://community.landesk.com/support/docs/DOC-5775

                                

            Regis

            • 3. Re: deploy wallpaper to all PC
              zman Master

              I'm assuming you don't use active directory. If you have Active Directory than GPO is you best option, if not you will be hacking the registry. My thoughts on this are eventhough you may not have GPO, then you should still use the policy keys that GPO uses. This makes it somewhat supportable now and in the future. If you are curious here is a link to all the group policy setting reg keys in excel format.

               

              Your biggest issue will be that 99% of these settings are in HKCU. So when LANDesk runs vulscan/sdclient if the user is not local admin it elevates the rights to local system account. This makes any hkcu setting null and void for your users since nobody can run windows interactively using the local system account.

               

              So options - some have been discussed, biut remeber that this is a HKCU setting.

               

              1. Software distribution -
                1. This script - I have not tested. Appears to change all profiles.
                2. Option Explicit
                  
                  Const HKUSERS = &H80000003
                  Dim WshShell : Set WshShell = CreateObject("Wscript.Shell")
                  Dim objReg : Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
                  Dim arrRegKeys,arrDesktopKeys,subkey
                  Dim strWallpaperPath : strWallpaperPath = PATH_TO_WALLPAPER_FILE_HERE
                  UserHives("Load")
                  
                  objReg.EnumKey HKUSERS, "", arrRegKeys
                  
                  For Each subkey In arrRegKeys
                     objReg.EnumKey HKUSERS, subkey & "\Control Panel\Desktop", arrDesktopKeys
                     If Not IsNull(arrDesktopKeys) Then 
                         WshShell.regwrite "HKEY_USERS\" & subkey & "\Control Panel\Desktop\WallPaper", strWallpaperPath
                         WshShell.regwrite "HKEY_USERS\" & subkey & "\Control Panel\Desktop\TileWallPaper", 0
                     End If
                  Next
                  
                  UserHives("Unload")
                  
                  Sub UserHives(LoadUnload)
                     
                     'LoadUnload = Load => load user hives / Unload => Unload user hives 
                     Dim strRegExe, strRegOpt, strDocSet, strcom, strFullHive, Windir,strDatFile
                     Dim colSubfolders, objFolder, objSubfolder,objFSO
                      
                      Set WshShell = CreateObject("Wscript.Shell")
                      WinDir = WshShell.ExpandEnvironmentStrings("%WinDir%")
                      
                      strDocSet = "C:\Documents and Settings"
                      strRegExe = WinDir & "\System32\Reg.exe"
                      
                      Set objFSO = CreateObject("Scripting.FileSystemObject")
                      Set objFolder = objFSO.GetFolder(strDocSet)
                      Set colSubfolders = objFolder.Subfolders
                      For Each objSubfolder in colSubfolders
                           strDatFile = strDocSet & "\" & objSubfolder.Name & "\NTUser.dat"
                           Select Case LoadUnload
                                Case "Load" strcom = strRegExe & " LOAD " & Chr(34) & "HKU\" & objSubfolder.Name & Chr(34) & " " & chr(34) & strDatFile & Chr(34) 
                                Case "Unload" strcom = strRegExe & " UNLOAD " & Chr(34) & "HKU\" & objSubfolder.Name & Chr(34)
                           End Select
                           
                           WshShell.Run strcom,0,True
                      Next
                      
                  End Sub
                  
                  

              In additiion to this I would load the C:\Documents and Settings\Default User\ntuser.dat in your image and set the setting there since this key is used for all new users thtat logs in.