[wpkg-users] Tip to shut off Win7 ?

Stefan Pendl stefan.pendl.71 at gmail.com
Tue Dec 3 23:50:57 CET 2013


Am 02.12.2013 13:42, schrieb Cedric Frayssinet:
> 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 ?
>
>
Sorry, I forgot to clean up the line with the command.

The two backslashes and the double quotes must be removed as shown below.

You can check this if you take a look at the command line of the 
scheduled task in the task database.

'---code start (watch for line wraps)

|/tr "%PKG_EXE%"

|'---code end

--
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?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20131203/8a8c36b2/attachment-0003.html>


More information about the wpkg-users mailing list