V
V
valgerofficial2019-02-27 19:11:15
Windows
valgerofficial, 2019-02-27 19:11:15

How to run a file without accessing the flash drive?

Hi friends. Such is the task .. I have a VBS script on the flash drive, going into the explorer I prescribe the path F:\script.vbsBut it gives me an error .. that there is no such file on the flash drive. BUT HE IS THERE. And when I go to the flash drive and from there I write this command in the address bar .. the script is executed. What is the problem? I do not quite understand .. Please explain.
UDCOvC-1eB0.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2019-02-27
@valgerofficial

The error means not that there is no f:\usbst.vbs file, it means that the script cannot find the file it is trying to access.
Most likely the script opens a file located in the current directory. But when you run it from something other than f:\, the current directory is anything other than f:\, so the file can't be found.
You must use absolute paths. In the script, determine the path where the script itself is located and open the desired file along this path.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question