Windows 7 (and windows XP) : a method to run wpkg at shutdown

(sorry for my basic english...)

Firstly, the actual option "run at system shutdown" of wpkg client is not compatible with windows 7.

Secondly, windows 7 systematically kills wpkg service after 10 minutes.

My solution : i don't use wpkg service, i call directly wpkg.js with a simple script at shutdown !
Explanation of method in 5 steps :

*** Step 1 ***  (increase to 30 minutes the "gpo script timeout")
with gpo : Computer Configuration \ Administrative Templates \ System \ Scripts
Maximum wait time for Group Policy scripts = 1800

--- OR ---

with a registry script :

*** Step 2 *** (increase to 30 minutes "gpsvr service timeout" for windows 7)
with a registry script (launch at startup) :

*** Step 3 *** (display script during shutdown)
with  gpo  :
Computer Configuration\Administrative Templates\System\Logon
Run shutdown scripts visible = Enable
Computer Configuration\Administrative Templates\System
Verbose vs normal status messages = Enable

 --- OR ---

with a registry script :
" VerboseStatus"=dword:00000001

*** step 4 *** (create and "secure" the user account "wpkguser" )

Create a user account "wpkguser" (on domain  or directly on the server)

All shares \\\wpkg$, \\\tools$, \\\sotware$ must be "read only" for user account "wpkguser".

If necessary, disable windows logon for account "wpkguser" by using a script logon like this "logoff.bat" :
@echo off
shutdown /l /f >nul

*** Step 5 *** (run this script at shutdown with a gpo OR locally with gpedit.msc)
 Computer Configuration \ Windows Settings \ Scripts \shutdown \ Wpkg.bat :
@echo off
echo.       ___________________________________________________
echo       i\ _________________________________________________\
echo.      i i                                                  i
echo       i i   Mises a jour en cours : vous pouvez partir.    i
echo.      i i                                                  i
echo       i i   L'ordinateur s'eteindra lui-meme.              i
echo.      i i                                                  i
echo        \i__________________________________________________i
rem (disable mouse : thanks to Daniel Dehennin)
start /B /d "%programfiles%\wpkg" nomousy /f -h >nul
rem (with the user account "wpkguser" mount network map without drive letter) net use \\\wpkg$ /user:domain-or-computer\wpkguser wpkgpassword >NUL
rem (define the variables use in the packages)
set TOOL=\\\tools$
set SOFTWARE=\\\software$
rem (call  "wpkg.js" script )
cscript  //Nologo \\\wpkg$\wpkg.js /synchronize /nonotify /quiet
rem (call a script "wpkgbaseclient.bat" to store wpkg.xml and .log on server)
call \\\wpkg$\wpkgbaseclient.bat

Good test !


Bruno CHOQUET, responsable du service informatique de l'IUT d'Alençon.
correspondant informatique du site universitaire d'Alençon.
Tel :

wpkg-users mailing list archives >>
wpkg-users mailing list

Reply via email to