P
P
Pavel2018-03-17 18:59:01
cmd/bat
Pavel, 2018-03-17 18:59:01

How to run 2 vbs scripts?

why vbs file is not launched from another vbs?
I need to run 2 set.bat and WshShell.vbs
files in turn , the script itself looks like this (WshShell.vbs):

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "set.bat" & min & Chr(34), 0
WshShell.Run chr(34) & "C:\Users\pavel\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\WshShell.vbs" & min & Chr(34), 0
Set WshShell = Nothing

there are no problems with the first one, but the second file does not want any fields, I tried the way to do this:
"%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\WshShell.vbs"

how to set full path to execute vbs file?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2018-03-17
@res2001

What's in the min variable?
vbs run via cscript/wscript, i.e.
cscript.exe C:\Users\pavel\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\WshShell.vbs
You have no problems with the paths, both options should work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question