Re: [wpkg-users] Handling Win7 and WinXP with run on shutdown
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: Hello, Hello, [...] * Use run-on-shutdownNO/run-on-shutdown in settings.xml * At install time: - stop the WPGK service: sc stop wpkgservice - configure it to start manually: sc config wpkgservice start= demand - add the registry setting to display script during shutdown: REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v HideShutdownScripts /t REG_DWORD /d 0 /f - setup the GPO to run a script at shutdown[1] - use nomousy.exe to prevent user from closing the window displayed at shutdown I forgot some settings, here is my postinstall.cmd: #v+ postinstall.cmd @echo off REM Do not export variables SETLOCAL SET CMD_PATH=%~dp0 echo Stop WPKG service %ComSpec% /c sc stop wpkgservice NUL echo Suppress winlogon notification at startup %ComSpec% /c reg delete HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\WPKGLogon /v Startup /f NUL 2 NUL echo Manual start of WPKG %ComSpec% /c sc config wpkgservice start= demand NUL echo Show script at shutdown %ComSpec% /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v HideShutdownScripts /t REG_DWORD /d 0 /f NUL echo Windows in verbose mode %ComSpec% /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v VerboseStatus /t REG_DWORD /d 1 /f NUL echo Put the policy in place %ComSpec% /c xcopy /E /V /I /Q /H /N /Y %CMD_PATH%\grouppolicy\* %windir%\system32\grouppolicy\ %ComSpec% /c reg import %CMD_PATH%\gpo_wpkg.reg REM End of local variables ENDLOCAL REM Local Variables: REM mode: cmd REM comment-start: REM REM comment-end: REM End: #v- -- Daniel Dehennin RAIP de l'Orne pgpYhTXuuYxJZ.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Handling Win7 and WinXP with run on shutdown
Hello, We try to handle the run of WPKG at shutdown in the same way for win7 and winxp. Here is a working setup: * Use run-on-shutdownNO/run-on-shutdown in settings.xml * At install time: - stop the WPGK service: sc stop wpkgservice - configure it to start manually: sc config wpkgservice start= demand - add the registry setting to display script during shutdown: REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v HideShutdownScripts /t REG_DWORD /d 0 /f - setup the GPO to run a script at shutdown[1] - use nomousy.exe to prevent user from closing the window displayed at shutdown The logon-delay control how long the message box is diplay at the end, by default, more than 10 minutes is useless since windows limit the shutdown delay to 10 minutes. The script launched at shutdown is the following: #v+ @echo off Echo *** WPKG : mises a jour des applications en cours *** Echo *** Veuillez patienter *** REM disable mouse start /b /d %windir% nomousy /f -h REM Start WPKG service sc start wpkgservice NUL REM Start WPKG message box start /B /wait /d %programfiles%\wpkg wpkgmessage.exe :end Echo *** Fin des mises a jour *** REM Little pause to let WPKG complete write of the log file on the REM server ping -n 2 localhost NUL #v- Regards. Footnotes: [1] Wonder how to automate this, for now copy some files under %windir%\system32\grouppolicy\ and import a reg -- Daniel Dehennin RAIP de l'Orne pgp0ZBojvqMvb.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users