6 Replies Latest reply on Mar 26, 2015 3:45 AM by kesch

    Install Software only if no User is logged in

    kesch Specialist

      Hi

       

      Is there a possibility to install certain Software only, if no user is logged in.

      In my opinion it is only possible with patch management.

      Is there any ways to do this using Software Distribution?

       

      Regards,

      Kevin

        • 1. Re: Install Software only if no User is logged in
          Markus.Gonser ITSMMVPGroup

          Hi kevin,

          you have set following configuration in your Distribution and Patch setting of your Agent:

           

          logged-off_installation_ldms9.6.png

           

          best regards

          Markus

          • 2. Re: Install Software only if no User is logged in
            kesch Specialist

            Hi Markus,

             

            I know, but then it is possible to install software even if the user is logged in.

            I want to let the Software only install, when no user is logged in.

             

            Regards,

            Kevin

            • 3. Re: Install Software only if no User is logged in
              Markus.Gonser ITSMMVPGroup

              Hi Kevin,

              why do you want to install software only when no user is logged in?

               

              bestr regards

              Markus

              • 4. Re: Install Software only if no User is logged in
                kesch Specialist

                I can prevent processes, which could be opened from users. For example firefox add-ons can only be installed, when firefox isn't running.

                If we could install it while system shutdown or startup, it would be great. But the option "defer until log on" is to "slow". The user is able to start the process before the task will be pulled after log on.

                 

                And Patch Defintions has to be scanned before..

                 

                Do you see my problem?

                • 5. Re: Install Software only if no User is logged in
                  MarXtar ITSMMVPGroup

                  There isn't a standard way of doing this. One thing to note as well is even if you do find a way of doing this you will only affect the starting of the installation, if a user logs on part way through then you won't be able to stop it, so it isn't foolproof.

                   

                  You could try wrapping your package with a vbscript like the one below:

                   

                  strComputer = "."

                   

                  Set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

                  Set objShell = WScript.CreateObject("WScript.Shell")

                   

                  Set colSessions = objWMI.ExecQuery("SELECT * FROM Win32_LogonSession WHERE LogonType = 2")

                   

                  strCmd = ""

                   

                  If colSessions.Count = 0 Then

                    ' No interactive users found

                    strCmd = "cmd /c echo No-one here > out.txt"

                  Else

                    ' Interactive users found

                    strCmd = "cmd /c Echo Someone here > out.txt"

                  End If

                   

                  objShell.Run strCmd

                   

                   

                  I haven't done extensive testing but the example above works on my Win7 machine. Your actual commands would need to be launching the installation. This could work and be free for you.


                  An alternative that allows you to update the inventory with real-time state information that you can use for targeting is our State Management module which you can see using the link in my signature. Might be worth looking at if user and machine states matter when you are managing your devices.

                   

                  Mark McGinn

                  MarXtar Ltd/MarXtar Corporation

                  http://landeskone.marxtar.co.uk

                  LANDESK One Development Partner

                   

                  The One-Stop Shop for LANDESK Enhancements

                  • 6. Re: Install Software only if no User is logged in
                    kesch Specialist

                    Hi Mark

                     

                    Thank you for your help. I think it would be a good idea, if we could set up the same or almost the same settings for SWD as for the Patch Management. The two features are now in the same settings, so I think it isn't a big step to realize it. Maybe I'll write an ER.

                     

                    I will have a look at your solution.

                     

                    Regards,

                    Kevin