1

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.

6
  • What happens if you use dir command instead of wscript? Commented May 6, 2016 at 19:48
  • That server has a share called PrintDrivers? Commented May 6, 2016 at 20:32
  • 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 Commented May 6, 2016 at 20:58
  • I want to use this script to be able to install 8+ printers depending on what the client needs. Commented May 6, 2016 at 21:01
  • It seems like a permissions issue to me. Are you running the script with the same credentials you are browsing to the share with? Commented May 9, 2016 at 18:56

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

Still no luck, "Can not find script file H:\BH Dockside.vbs" thanks for the suggestion, I will keep trying.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.