1
votes

I am working on getting this batch command to call a .vbs script on our local share folder. There are no restriction to this folder for anyone. when running the script I get this error:

Windows Script Host

Can not find script file "\bh-miworks-srv2\PrintDrivers\Printers\Benton Harbor\BH Dockside.vbs".

the code is: wscript "\\bh-miworks-srv2\PrintDrivers\Printers\Benton Harbor\BH Dockside.vbs"

To me it doesn't get any simpler that that. I figure its something simple I am missing but I just don't see it. If anyone has run into this issue before and knows how to fix it,any direction would be appreciated.

Any Ideas? Thanks.

1
What happens if you use dir command instead of wscript? - JosefZ
That server has a share called PrintDrivers? - Chuck
Using dir insted of wscript: "Volume in drive \\bh-miworks-srv2\PrintDrivers is Data2" "Volume Serial Number is 924F-3AF9" "Directory of \\bh-miworks-srv2\PrintDrivers\Printers\Benton Harbor File Not Found" I need BH Dockside.vbs - Wchristner
I want to use this script to be able to install 8+ printers depending on what the client needs. - Wchristner
It seems like a permissions issue to me. Are you running the script with the same credentials you are browsing to the share with? - langstrom

1 Answers

1
votes

Did you try something like this:

Set objNetwork = WScript.CreateObject("WScript.Network")
strRemoteShare = "\\bh-miworks-srv2\PrintDrivers\Printers\Benton Harbor" 
objNetwork.MapNetworkDrive "H:", strRemoteShare, False

and then start the vbs from H:\BH Dockside.vbs