1 Reply Latest reply on Sep 30, 2009 2:07 PM by Jared Barneck

    How to distribution only when no one logged in?

    Rookie

      I'd like to distribute a software package only when no one is logged in.  We have a package that installs fine but breaks the networking stack until rebooted [this is unavoidable.]  What I'd like to do is set up the package to run every night but only run if no one is logged in - this way they won't be interrupted.

       

      I can use a script to check if explorer.exe is running [targets are all XP desktops] and if no matches come back then we know no one is logged in and we can run/reboot.

       

      I was wondering if there is a more direct way within landesk?

       

      TIA

       

      Mike

        • 1. Re: How to distribution only when no one logged in?
          Jared Barneck SupportEmployee

          Use "StartAsUser.exe" in a batch file and do the reverse:

           

          REM Sample Batch file
          
          StartAsUser.exe somehiddenprocess.exe
          REM I forgot the return code if noone is logged in, look it up.
          If ERRORLEVEL==###  GOTO LoggedIn ELSE GOTO loggedout
          
          :LoggedIn
          REM Do whatever you want here.
          
          GOTO end
          
          :LoggedOut
          REM Do whatever you want if no one is logged in.
          
          GOTO end
          
          :end
          

           

           

          Do a search for StartAsUser.exe and have a nice day.