Hello.. the following code runs a batch file.. it works but it prompts to "RUN" the file.. Is there a way to bypass the "RUN" prompt?
Please Login or Register to view this content.
Hello.. the following code runs a batch file.. it works but it prompts to "RUN" the file.. Is there a way to bypass the "RUN" prompt?
Please Login or Register to view this content.
cant you add that functionality to the batch file?
When we used to run or build batch files, there was a command you could add to the actual batch or even part of the path to prevent that prompt.
You can use the Arguments property to pass command line parameters:
WshShell.Run chr(34) & “C:\Batch Files\syncfiles.bat” & Chr(34) & WScript.Arguments(0), 0
I found it useful to verify the command string before putting it into the script:
WScript.Echo chr(34) & “C:\Batch Files\syncfiles.bat” & Chr(34) & WScript.Arguments(0)
Last edited by cubangt; 04-30-2021 at 02:23 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks