[wpkg-users] Windows 7 (and windows XP) : a method to run wpkg at shutdown

Bruno CHOQUET bruno.choquet at unicaen.fr
Wed Jul 20 12:18:51 CEST 2011


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 :
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"MaxGPOScriptWait"=dword:00000708

*** Step 2 ***  (increase  to 30 minutes "gpsvr service timeout" for  
windows 7)
with a registry script (launch at startup) :
  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\gpsvc]
"PreshutdownTimeout"=dword:1b7740

*** 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 :
  [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"HideShutdownScripts"=dword:00000000
" 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 \\192.1.1.2\wpkg$, \\192.1.1.2\tools$, \\192.1.1.2\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
cls
echo.
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
echo.
echo.
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  \\192.1.1.2\wpkg$ /user:domain-or-computer\wpkguser 
wpkgpassword >NUL
rem (define the variables use in the packages)
set TOOL=\\192.1.1.2\tools$
set SOFTWARE=\\192.1.1.2\software$
rem (call  "wpkg.js" script )
cscript  //Nologo \\192.1.1.2\wpkg$\wpkg.js /synchronize /nonotify /quiet
rem (call a script "wpkgbaseclient.bat" to store wpkg.xml and .log on 
server)
call \\192.1.1.2\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.
http://www.unicaen.fr/iutalencon
Tel : 02.33.80.85.10

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20110720/bae90404/attachment.html>


More information about the wpkg-users mailing list