Finally I found the solution. The above error message was a little bit confusing :-).
The tasks we would like to modify were not located in the root folder but in subdirectories.
So the following code is finally working:
The tasks we would like to modify were not located in the root folder but in subdirectories.
So the following code is finally working:
Using ts As New TaskService("YourRemoteServerName")
Dim task = ts.GetFolder("YourSubdirectoryName").Tasks("YourTaskName")
If task IsNot Nothing
Dim action As ExecAction = task.Definition.Actions("YourID")
' Dim action = task.Definition.Actions(0)
action.Arguments = "new argument string"
task.RegisterChanges()
End If
End Using