[wpkg-users] wpkg client and windows 7

laurent COOPER laurent.cooper at ac-grenoble.fr
Wed Oct 9 12:11:37 CEST 2013


Le 1 oct. 2013 à 21:56, Stefan Pendl a écrit :

> Am 01.10.2013 21:40, schrieb Carlos R. Pasqualini:
>> El mar, 01-10-2013 a las 20:58 +0200, Stefan Pendl escribió:
>> 
>>> On WinXP and below I used WPKG client at shutdown.
>>> On Vista and above I use a scheduled task to check if a user is logged
>>> on, if not WPKG is executed and the system is shutdown after that.
>> ¿you set up that task using a script?
>> ¿would you mind to post/share it here?
>> 
>> 
> See below.
> 
> '---code start (watch for line wraps)
> 
> @rem
> @echo off
> 
> set isUserLoggedOn=0
> for /F "tokens=1" %%P in ( 'tasklist' ) do if /i "%%~P" == "explorer.exe" set isUserLoggedOn=1
> if %isUserLoggedOn% EQU 1 goto :EOF
> 
> if not defined MY_WPKG_SOFTWARE goto :finish
> if not defined MY_WPKG_ROOT     goto :finish
> 
> 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.
> 
> :finish
> shutdown.exe -s -t 600 -d p:4:1
> 
> '---code end

Thank you for your posts and your script.

So wpkg can be made to work using a script at anytime indeed.

Just a question... If a user turn on a computer, then wait let's say 5 minutes before he logs on. If during this time your script is launched, it will launch the script and shutdown ?

Another question : if wpkg variables are not defined you shut down ? Why not just do nothing ?

Thank you again

Laurent

--
laurent COOPER
CARMI de l'académie de Grenoble
laurent.cooper at ac-grenoble.fr










More information about the wpkg-users mailing list