[wpkg-users] Run on a schedule

Stefan Pendl stefan.pendl.71 at gmail.com
Tue Aug 21 08:49:18 CEST 2012


Am 20.08.2012 12:55, schrieb Malte Starostik:
> 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");
>

Thanks for posting that one-liner ;-)


--
Stefan P.

Top-posting:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?



More information about the wpkg-users mailing list