[wpkg-users] Global max execution time hardcoded?

Stefan Pendl stefan.pendl.71 at gmail.com
Fri Mar 29 09:27:12 CET 2013


Am 27.03.2013 09:39, schrieb Marco Gaiarin:
>
> Sorry, i seek more info: you have scheduled a task that run on ''idle''
> time? Or that run on ''no one logged on''?
> If wpkg start and someone logon, wpkg stop, pause, what? Can you share
> your scripts?
> I'm curious... ;)))
>

No, it is a regular scheduled task, that gets executed at a certain time.
I even manage server workload by having each department run at its own 
time every 5 minutes.

Example:

CAM department shuts down at 22:00, CAD at 22:05, assembly at 22:10, etc.

Find the executed batch script below.

>
> Meetoo. But i think also that provide feedback to the user is a
> valuable thing, so still i hope that a fully working ''agent'' (as WPKG
> Client was for XP) is needed.
>

If you run WPKG at times where no users are logged on, there is nothing 
to worry about, so I really avoid running WPKG at startup of logon.

Shutdown has always been my preferred way to run WPKG, since I don't 
have to take care of running processes at all.
Having to kill Firefox or similar is just nonsense for a deployment package.

Installation works best when the system is unused, there is no situation 
that would qualify to do it differently.
Any installer requiring a regular user to run it was created by an 
insane developer, that is trapped in the ancient days of Win95/98.


rem ---code start (watch for line wraps)

@rem
@echo off

set task_log=%TMP%\%~n0.txt

tasklist | findstr /i ".exe" | sort >"%task_log%"

rem check for logged on user
for /F "tokens=1" %%P in (%task_log%) do if /i "%%~P" == "explorer.exe" 
goto :EOF

if not defined MY_WPKG_SOFTWARE goto :doit
if not defined MY_WPKG_ROOT     goto :doit

rem run WPKG
Set SOFTWARE=%MY_WPKG_SOFTWARE%
Set WPKG_ROOT=%MY_WPKG_ROOT%

echo.
call "%WPKG_ROOT%\tools\WPKGclearLog.bat"
echo.
cscript.exe "%WPKG_ROOT%\wpkg.js" /synchronize /nonotify /quiet
echo.
call "%WPKG_ROOT%\tools\WPKGclientCollect.bat"
echo.

:doit
shutdown.exe -s -t 600 -d p:4:1

rem ---code end

--
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