Utilisateur anonyme
-
2 août 2011 à 18:41
Utilisateur anonyme -
3 août 2011 à 18:42
Bonjour,
je voudrais crée une tache planifié pour une appli en vb.net, j'ai trouvé le code en ligne de commande, quand je le lance en ouvrant la cmd sa marche, mais pas quand je lance mon appli en VB.NET
Dim TachePlanifiée As New Process
With TachePlanifiée.StartInfo
.FileName = "cmd.exe"
.Arguments = ("schtasks /create /sc daily /mo 28 /st 00:05:00 /tn ""DefragAuto"" /tr c:\windows\system32\Defrag.bat")
.WindowStyle = ProcessWindowStyle.Hidden
End With
TachePlanifiée.Start()
Merci de m'aider :)
A voir également:
Tache planifiée se crée avec CMD mais pas avec mon appli
Dim TachePlanifiée As New Process
With TachePlanifiée.StartInfo
.FileName = "schtasks"
.Arguments = ("/create /sc daily /mo 28 /st 00:05:00 /tn ""DefragAuto"" /tr c:\windows\system32\Defrag.bat")
.WindowStyle = ProcessWindowStyle.Hidden
End With
TachePlanifiée.Start()