Results 1 to 2 of 2
2012-11-07, 19:48 #1
- Join Date
- Jul 2002
- Ankeny, Iowa, USA
- Thanked 0 Times in 0 Posts
Code to run a batch file located on a different server
I have the following code I found on the internet that would work great if the batch file I needed to run was located on my local computer. The windows batch file I need to run is located on a server that I have created a map for (E drive). How can I get the following code to work on the mapped drive of E?
When I log onto the F9 server via a VNC viewer connection, the file path is:
Any help is always appreciated!
Dim Update As Double
Update = Shell("cmd /k E:\IFMUpdate.bat", vbNormalFocus)
2012-11-08, 02:48 #2
- Join Date
- Feb 2008
- A cultural area in SW England
- Thanked 196 Times in 176 Posts
I don't do VB, but from an ordinary server point of view I would suggest:
Update = Shell("cmd /k E:\F9V5\pro50_p\IFMUpdate.bat", vbNormalFocus)
and possibly change the cmd /k to cmd /c .
Obviously this assumes that you have mapped E: to C$ on the server - if this isn't the case, the path will change accordingly!BATcher
"The trouble with quotes on the internet is that you can never know if they are genuine."
The Following User Says Thank You to BATcher For This Useful Post: