Вопрос

I am trying to run a file hidden which needs to include options in order to run.

Usually I run the file in batch, where I do something like this

@echo off

"%~dp0/file.exe" -a -b -c -d asdf

Now, I want to run this program hidden, so I use yet another .bat and a .vbs to do it

a.vbs:

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False

run.bat:

@echo off
wscript.exe "%~dp0/a.vbs" "%~dp0/file.exe"

How do I run the program with parameters like this, or is there yet another way?

Это было полезно?

Решение

You can run your run.bat like this :

run.bat -a -b -c -d asdf

and your run.bat file will look like this :

@echo off
wscript.exe "%~dp0/a.vbs" "%~dp0/file.exe" %1 %2 %3 %4 %5
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top