You’ll need to mount the external server’s volume for this to work. It works in cmd and PowerShell because they understand the “\\server” syntax and do the mount for you.
To see what I mean, after you call that in cmd, check your volumes in Explorer.
If it is really running as a service, you must assign the service an user account to run. The standard “local system”-account most services run under does not have access to network-shares. The user the service is assigned to must have rights to access your UNC-path.
Thats not going to be possible in the environment the program will be running in. I might have to have a re-think.
I have just noticed after reading the help more thoroughly that I need a loop to check if the shell is still running. I was checking for the error before the shell had finished.
So this now at least gives me an error.
Dim sh As New Shell
sh.Mode = 1
sh.Arguments = "http://www.google.co.uk"
sh.Execute("\\\\OTHER_SERVER\\path_to_file\\other.exe")
do
App.doevents(50)
loop until sh.isrunning = false or App.StopProcessing = true
System.DebugLog "Shell Command Error:" + str(sh.ErrorCode)
System.DebugLog "Shell Command Result:" + sh.result
Marcus: I should be ok with this particular share as its accessible by everyone.
[quote=159125:@Andy Marshman]I have just noticed after reading the help more thoroughly that I need a loop to check if the shell is still running. I was checking for the error before the shell had finished.
[/quote]
Also, be sure to set the sh.Timeout to -1.