Reputation: 1044
Very simple question I am sure.
I have a file called ACLReader.vbs which I have written. I want a user to be able to run a batch file
I also want the batch to take a parameter and pass it to ACLReader.vbs instead of using testText.txt (as the user would if execute ACLReader.vbs from the command line)
This is what I have from googling but it doesn't work:
%~d0
cd %~p0
cscript ACLReader.vbs testText.txt
Upvotes: 2
Views: 9674
Reputation: 65981
To make the CD command in your original script work, you have to change it in the following way:
cd /D "%~dp0"
cscript ACLReader.vbs %*
Upvotes: 1