Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim sw As New StreamWriter("C:\Windows\System32\Defrag.bat") sw.WriteLine("Ma commande") sw.Close() Dim TachePlanifiée As New Process With TachePlanifiée.StartInfo .FileName = "cmd.exe" .Arguments = ("schtasks /create /ru user /rp Password /sc daily /MO 28 /ST 18:00:00 /TR "C:\Windows\System32\Defrag.bat" /TN AutomaticDefrag ") ' Ici, la commande a des " donc sa m'annule la valeur string que faire ? .WindowStyle = ProcessWindowStyle.Hidden End With TachePlanifiée.Start() End Sub