[wpkg-users] wpkg client and windows 7

Stefan Pendl stefan.pendl.71 at gmail.com
Tue Oct 1 21:56:52 CEST 2013


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

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