[wpkg-users] Tip to shut off Win7 ?

Cedric Frayssinet cedric.frayssinet at gmail.com
Sat Nov 23 23:00:11 CET 2013


Le 23 nov. 2013 22:51, "Stefan Pendl" <stefan.pendl.71 at gmail.com> a écrit :
>
> Am 23.11.2013 22:31, schrieb Cedric Frayssinet:
>
>>
>> Yes but 4000 computers have been already installed :/
>> I'd like to make that with wpkg...
>>
>>
>
> Here is an example package, you need to change the time and the name of
the schedule frequency to match your locale.
>
> --
> '---code start (watch for line wraps)
>
> <package
>         id="ShutdownComputer"
>         name="JH Shutdown Computer"
>         revision="2011.10.27"
>         reboot="false"
>         priority="900">
>
>     <depends package-id="RebootShutdownCMD" />
>
>     <variable name="PKG_TIME_S" value="22:00:00"/>
>     <variable name="PKG_TIME_S" value="22:05:00" hostname="^AV.+"/>
>     <variable name="PKG_TIME_S" value="22:10:00" hostname="^CAD.+"/>
>     <variable name="PKG_TIME_S" value="22:15:00" hostname="^CAM.+"/>
>     <variable name="PKG_TIME_S" value="22:20:00" hostname="^E.+"/>
>     <variable name="PKG_TIME_S" value="22:25:00" hostname="^[GHI].+"/>
>     <variable name="PKG_TIME_S" value="22:30:00" hostname="^KST3.+"/>
>     <variable name="PKG_TIME_S" value="22:35:00" hostname="^KST4[0-2].+"/>
>     <variable name="PKG_TIME_S" value="22:40:00" hostname="^KST4[3-6].+"/>
>     <variable name="PKG_TIME_S" value="22:45:00" hostname="^KST[56].+"/>
>     <variable name="PKG_TIME_S" value="22:50:00" hostname="^[L-Q].+"/>
>     <variable name="PKG_TIME_S" value="22:55:00" hostname="^[R-V].+"/>
>     <variable name="PKG_EXE"    value="shutdown -s -t 600"/>
>
>     <!-- english variables -->
>     <variable name="PKG_SCHEDULE" value ="WEEKLY" />
>     <variable name="PKG_DAYS"     value ="MON,TUE,THU,FRI,SAT,SUN" />
>
>     <!-- german variables -->
>     <variable name="PKG_SCHEDULE" value ="WÖCHENTLICH"
lcid="407,c07,1407,1007,807" />
>     <variable name="PKG_DAYS"     value ="MO,DI,DO,FR,SA,SO"
lcid="407,c07,1407,1007,807" />
>
>     <!-- Server 2003 english -->
>     <variable name="PKG_SCHEDULE" value ="WEEKLY"
 os="server" lcidOS="409"/>
>     <variable name="PKG_DAYS"     value ="MON,TUE,THU,FRI,SAT,SUN"
os="server" lcidOS="409"/>
>
>     <variable name="PKG_TASK_NAME" value ="JH_Shutdown_Computer" />
>
>     <check type="file"    condition="exists"
 path="%SystemRoot%\Tasks\%PKG_TASK_NAME%.job"
 os="5\.\d\.\d{4}"/>
>     <check type="execute" condition="exitcodeequalto" path='SCHTASKS
/Query /NH /TN "%PKG_TASK_NAME%"' value="0" os="6\.\d\.\d{4}"/>
>
>     <install include="remove" />
>     <install cmd='%ComSpec% /c schtasks /create /tn "%PKG_TASK_NAME%" /tr
"\"%PKG_EXE%\"" /sc %PKG_SCHEDULE% /d "%PKG_DAYS%" /st "%PKG_TIME_S%" /ru
"SYSTEM" >"%TMP%\%PKG_TASK_NAME%.log"' />
>
>     <upgrade include="install" />
>
>     <remove cmd='SCHTASKS /Delete /TN "%PKG_TASK_NAME%" /F' >
>         <exit code="1"/>
>     </remove>
> </package>
>
> '---code end
>
>

Thanks a lot Stefan ! I will study it next week :)

Cedric



> --
> 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?
>
> -------------------------------------------------------------------------
> Hotel discounts, best prices: http://www.booking.com/index.html?aid=366545
> -------------------------------------------------------------------------
> wpkg-users mailing list archives >>
http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-users at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/wpkg-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20131123/79b9da2c/attachment-0003.html>


More information about the wpkg-users mailing list