Hallo Zusammen,
wie führe ich eine batch-Datei aus?
Folgendes habe ich probiert, aber damit wird die Datei nicht ausgeführt:
C
----------------------------
#include <MsgBoxConstants.au3>
If Not FileExists("C:\Users\User\Downloads\curl\ReconnectRouter.bat") Then
MsgBox(64, "Error", "Cannot find C:\Users\User\Downloads\curl\ReconnectRouter.bat")
Exit
EndIf
Run("ReconnectRouter.bat"," C:\Users\User\Downloads\curl\")
----------------------
$CMD = 'curl http://192.168.1.1/web.cgi" -d "controller=Overview&action=Login&id=0&idTextPassw ord=Asdf1234" -c cookies.txt --cookie cookies.txt' & _
'curl "http://192.168.1.1/web.cgi" -d "controller=Overview&action=StopPppoeMan&id=0" --cookie cookies.txt' & _
'curl "http://192.168.1.1/web.cgi" -d "controller=Overview&action=StartPppoeMan&id=0 " --cookie cookies.txt'
----------------------
$CMD = 'curl "http://192.168.1.1/web.cgi" -d "controller=Overview&action=Login&id=0&idTextPassw ord=Asdf1234" -c cookies.txt --cookie cookies.txt'
$CMD = 'curl "http://192.168.1.1/web.cgi" -d "controller=Overview&action=StopPppoeMan&id=0" --cookie cookies.txt'
$CMD = 'curl "http://192.168.1.1/web.cgi" -d "controller=Overview&action=StartPppoeMan&id=0 " --cookie cookies.txt'
;~ ; /c closes the CMD window once the command is complete.
RunWait('"' & @ComSpec & '" /c ' & $CMD, @SystemDir)
Alles anzeigen