[wpkg-users] Run on a schedule
Malte Starostik
lists at malte.homeip.net
Mon Aug 20 12:55:52 CEST 2012
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 <kristofer at cybernetik.net
> >
> > <mailto:kristofer at 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
More information about the wpkg-users
mailing list