Hi Guys,
Please help me, Is there a way to execute this line using API or any other option?
/system upgrade upgrade-package-source add address=xx.x.xx.xx user=admin
password
/system upgrade refresh
:delay 10
:if ([/system upgrade get [/system upgrade find source=xx.x.xx.xx] status]!=“installed”) do={/system upgrade download-all reboot-after-download=yes}
I’m currently using C#
I tried this using API
api.Send(“/system/script/add”);
api.Send(“=name=test”);
api.Send(“=source=/system upgrade upgrade-package-source add address=xx.x.xx.xx user=admin password /system upgrade refresh :delay 10 :if ([/system upgrade get [/system upgrade find source=xx.x.xx.xx] status]!=“installed”) do={/system upgrade download-all reboot-after-download=yes}”);
api.Send(“.tag=xxx”, true);
hopefully the script is inserted my problem is when I’m trying to execute that command also using API like this
api.Send(“/system/script/run”);
api.Send(“=.id=*1”);
api.Send(“.tag=xxx”, true);
my error is something like this
expected end of command (line 1 column 73)
we dont want to do this manually with hundreds of router because it is time consuming, I also tried using SSH in C# same error occured
any help will be appreciated
Thanks in advance ![]()