Daniel Dehennin <daniel.dehen...@ac-caen.fr> writes:

> Hello,

Hello,


[...]

>
> * Use <run-on-shutdown>NO</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

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

Reply via email to