0

I have a batch-file located on a network-share \\mydirector\somefoldername\otherfolder\mybatch.bat. I am looking for AutoIt to run this batch-file.

The following code does not work:

Run ('\\mydirector\somefoldername\otherfolder\mybatch.bat')

How to run a batch-file from a network-share?

user4157124
  • 2,809
  • 13
  • 27
  • 42
Mark
  • 27
  • 1
  • 10

1 Answers1

1

Try this code with working directory specified:

RunWait ( @ComSpec & " /c \\mydirector\somefoldername\otherfolder\mybatch.bat", "\\mydirector\somefoldername\otherfolder")

Meaning:

/C           Carries out the command specified by string and then terminates
@ComSpec     points to cmd.exe
tinamou
  • 2,282
  • 3
  • 24
  • 28