<p dir="ltr"><br>
Le 23 nov. 2013 22:51, "Stefan Pendl" <<a href="mailto:stefan.pendl.71@gmail.com">stefan.pendl.71@gmail.com</a>> a écrit :<br>
><br>
> Am 23.11.2013 22:31, schrieb Cedric Frayssinet:<br>
><br>
>><br>
>> Yes but 4000 computers have been already installed :/<br>
>> I'd like to make that with wpkg...<br>
>><br>
>><br>
><br>
> Here is an example package, you need to change the time and the name of the schedule frequency to match your locale.<br>
><br>
> -- <br>
> '---code start (watch for line wraps)<br>
><br>
> <package<br>
> id="ShutdownComputer"<br>
> name="JH Shutdown Computer"<br>
> revision="2011.10.27"<br>
> reboot="false"<br>
> priority="900"><br>
><br>
> <depends package-id="RebootShutdownCMD" /><br>
><br>
> <variable name="PKG_TIME_S" value="22:00:00"/><br>
> <variable name="PKG_TIME_S" value="22:05:00" hostname="^AV.+"/><br>
> <variable name="PKG_TIME_S" value="22:10:00" hostname="^CAD.+"/><br>
> <variable name="PKG_TIME_S" value="22:15:00" hostname="^CAM.+"/><br>
> <variable name="PKG_TIME_S" value="22:20:00" hostname="^E.+"/><br>
> <variable name="PKG_TIME_S" value="22:25:00" hostname="^[GHI].+"/><br>
> <variable name="PKG_TIME_S" value="22:30:00" hostname="^KST3.+"/><br>
> <variable name="PKG_TIME_S" value="22:35:00" hostname="^KST4[0-2].+"/><br>
> <variable name="PKG_TIME_S" value="22:40:00" hostname="^KST4[3-6].+"/><br>
> <variable name="PKG_TIME_S" value="22:45:00" hostname="^KST[56].+"/><br>
> <variable name="PKG_TIME_S" value="22:50:00" hostname="^[L-Q].+"/><br>
> <variable name="PKG_TIME_S" value="22:55:00" hostname="^[R-V].+"/><br>
> <variable name="PKG_EXE" value="shutdown -s -t 600"/><br>
><br>
> <!-- english variables --><br>
> <variable name="PKG_SCHEDULE" value ="WEEKLY" /><br>
> <variable name="PKG_DAYS" value ="MON,TUE,THU,FRI,SAT,SUN" /><br>
><br>
> <!-- german variables --><br>
> <variable name="PKG_SCHEDULE" value ="WÖCHENTLICH" lcid="407,c07,1407,1007,807" /><br>
> <variable name="PKG_DAYS" value ="MO,DI,DO,FR,SA,SO" lcid="407,c07,1407,1007,807" /><br>
><br>
> <!-- Server 2003 english --><br>
> <variable name="PKG_SCHEDULE" value ="WEEKLY" os="server" lcidOS="409"/><br>
> <variable name="PKG_DAYS" value ="MON,TUE,THU,FRI,SAT,SUN" os="server" lcidOS="409"/><br>
><br>
> <variable name="PKG_TASK_NAME" value ="JH_Shutdown_Computer" /><br>
><br>
> <check type="file" condition="exists" path="%SystemRoot%\Tasks\%PKG_TASK_NAME%.job" os="5\.\d\.\d{4}"/><br>
> <check type="execute" condition="exitcodeequalto" path='SCHTASKS /Query /NH /TN "%PKG_TASK_NAME%"' value="0" os="6\.\d\.\d{4}"/><br>
><br>
> <install include="remove" /><br>
> <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"' /><br>
><br>
> <upgrade include="install" /><br>
><br>
> <remove cmd='SCHTASKS /Delete /TN "%PKG_TASK_NAME%" /F' ><br>
> <exit code="1"/><br>
> </remove><br>
> </package><br>
><br>
> '---code end<br>
><br>
></p>
<p dir="ltr">Thanks a lot Stefan ! I will study it next week :)</p>
<p dir="ltr">Cedric<br><br><br><br></p>
<p dir="ltr">> --<br>
> Stefan P.<br>
><br>
> Top-posting:<br>
> A: Because it messes up the order in which people normally read text.<br>
> Q: Why is top-posting such a bad thing?<br>
> A: Top-posting.<br>
> Q: What is the most annoying thing in e-mail?<br>
><br>
> -------------------------------------------------------------------------<br>
> Hotel discounts, best prices: <a href="http://www.booking.com/index.html?aid=366545">http://www.booking.com/index.html?aid=366545</a><br>
> -------------------------------------------------------------------------<br>
> wpkg-users mailing list archives >> <a href="http://lists.wpkg.org/pipermail/wpkg-users/">http://lists.wpkg.org/pipermail/wpkg-users/</a><br>
> _______________________________________________<br>
> wpkg-users mailing list<br>
> <a href="mailto:wpkg-users@lists.wpkg.org">wpkg-users@lists.wpkg.org</a><br>
> <a href="http://lists.wpkg.org/mailman/listinfo/wpkg-users">http://lists.wpkg.org/mailman/listinfo/wpkg-users</a><br>
</p>