Am Montag, 20. August 2012, 08:59:09 schrieb Stefan Pendl: > Am 19.08.2012 18:50, schrieb Troy Hamilton: > > On Sun, Aug 19, 2012 at 9:19 AM, Kristofer <kristo...@cybernetik.net > > > > <mailto:kristo...@cybernetik.net>> wrote: > > Is it possible to run on a schedule (every 12 or 24 hours for > > example), in the case that users never log out, or I want to make > > sure updates get pulled by clients in a some-what timely fashion? > > Just add an new task using task scheduler, so you don't have to install > any other software. > > I am currently using a DOS command script, which checks if there is a > running explorer.exe process, since this indicates a logged on user.
This JS snippet (sorry for the broken formatting) works even in the - admittedly rare - case when people use a different shell than explorer.exe. Kiosk systems come to mind or developers that work on e.g. shell extensions and deliberately kill explorer.exe: if (GetObject("winmgmts://./root/cimv2").ExecQuery("select UserName from Win32_ComputerSystem where not UserName is null").Count > 0) WScript.Echo("Someone's logged in"); > It is seldom good to install software if a user is logged on. Oh, users dig that sudden reboot when they have lots of unsaved data ;) Seriously, not only can it often lead to unexpected behaviour even if all possible reboots have been inhibited...it also very much increases the need for reboot even when installing non-system software. So yes, if you have any way to do so, get the users to log off before running WPKG. Regards, Malte ------------------------------------------------------------------------- wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/ _______________________________________________ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users