3 Replies Latest reply on Apr 25, 2014 12:24 AM by Frank Wils

    Deleting registry keys via software distribution

    Rookie

      I've got a distribution package that executes a .BAT file that calls a .REG to delete 5 registry keys. If I manually merge the .reg it works fine, manually calling the .bat file works fine (both as the logged on user, as well as using PSEXEC to run a command as the system account), but when i deploy the package via LANdesk (Push delivery method) the package deploys, says it completes successfully, but doesnt delete the reg keys. If i go to the cached package folder in SDMCACHE and try the .bat and .reg from there, they work fine. Am i missing something? LD support pointed me to http://community.landesk.com/support/docs/DOC-2417 and http://community.landesk.com/support/docs/DOC-2900 but I dont see anything in there that I'm missing.

       

      We don't currently record the registry into inventory, so I can't use a custom definition either. Has anyone found any reall really reliable ways to delete reg keys via distribution packages? It seems like it shouldn't be that hard.

        • 1. Re: Deleting registry keys via software distribution
          Frank Wils ITSMMVPGroup

          Are you using a x64 OS? Be aware that LANDESK is 32-bit and will look for your keys in 32-bit registry. In your Distribution Package definition is a 'run as 64bit on 64bit OS' checkbox. Make sure you have that checked.

           

          Frank

          • 2. Re: Deleting registry keys via software distribution
            Rookie

            That's exactly what it turned out to be. I was able to find it using ProcessMonitor and noticed LANDesk was somehow inserting the \Wow6432\ path into the registry path i was trying to delete. Since i was calling a .reg file with the path specified in it i didnt expect that to be happening.

             

            I get that landesk is 32bit, but if i provided a specific path why would it jump in and insert the 32bit path? I don't do a whole lot of registry stuff so maybe it solves a lot of other issues to do it this way, but i can't really think of a scenario where this is helpful to users when a specific path is given. I'm also a little annoyed LANdesk support didnt suggest to try that out as a possibility.

            • 3. Re: Deleting registry keys via software distribution
              Frank Wils ITSMMVPGroup

              It's not really LANDESK, it is standard Windows behaviour for 32-bit programs to work this way. You could make an argument as to why the checkbox is not marked by default, though, as I think that solves more problems than letting it unchecked.

               

              Frank