Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call Run() with parameters

Tags:

People also ask

Can Run () take arguments?

No you can't pass parameters to the run() method.

How will the run () method be called?

The run() method is called as a normal function call.

Can we call run () method of a thread class?

No, you can not directly call run method to start a thread. You need to call start method to create a new thread. If you call run method directly , it won't create a new thread and it will be in same stack as main.


I've got this working line of code in Windows Batch

start "" /wait /i "C:\Program Files\Sandboxie\Start.exe" /box:NetBeans /wait "C:\Program Files\NetBeans 7.3\bin\netbeans64.exe"

I would like to run it via VBScript. But I don't know how to pass the path in parameter which has a space inside.

I came up with something like this:

Set objShell = CreateObject("Wscript.Shell")
objShell.Run("C:\Program Files\Sandboxie\Start.exe" /box:NetBeans /wait "C:\Program Files\NetBeans 7.3\bin\netbeans64.exe"), 1, True

But there is an error:

expected: ')'