Hi, I used your package Stefan like this : <package id="PowerOff-7" name="Extinction des postes Seven a heure fixe" revision="2013.11.24" reboot="false" priority="900"> <!-- definition de l'heure d'extinction --> <variable name="PKG_TIME_S" value="19:00:00"/> <!-- 120 est le temps en secondes au bout duquel Windows se ferme --> <variable name="PKG_EXE" value="shutdown -s -t 120"/> <!-- variables concernant l'execution de la tache --> <!-- on eteint les postes tous les jours --> <variable name="PKG_SCHEDULE" value ="DAILY" /> <!-- on donne un nom de tache --> <variable name="PKG_TASK_NAME" value ="Extinction_Postes_7" /> <check type="execute" condition="exitcodeequalto" path='SCHTASKS /Query /NH /TN "%PKG_TASK_NAME%"' value="0" os="6\.\d\.\d{4}"/> <install os=".+6\.[0-1]\.\d{4}" timeout="300" include="remove" /> <install os=".+6\.[0-1]\.\d{4}" timeout="300" cmd='%ComSpec% /c schtasks /create /tn "%PKG_TASK_NAME%" /tr "\"%PKG_EXE%\"" /sc %PKG_SCHEDULE% /st "%PKG_TIME_S%" /ru "SYSTEM" >"%TMP%\%PKG_TASK_NAME%.log"' /> <upgrade include="install" /> <downgrade include="install" /> <remove os=".+6\.[0-1]\.\d{4}" timeout="300" cmd='SCHTASKS /Delete /TN "%PKG_TASK_NAME%" /F' ><exit code="1"/></remove> </package> Scheduled task is ok on computers (attached file). But there is 2 errors on execute : - failure to start the action (error code : 2147942402) - failure to execute (same error code) Do you know how to resolve this problem ? Thanks a lot, Cedric 2013/11/23 Cedric Frayssinet <cedric.frayssinet at gmail.com> > > 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/20131202/0de842c6/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: tache_programmee.png Type: image/png Size: 72287 bytes Desc: not available URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20131202/0de842c6/attachment-0001.png> |