Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vbscript start a process

I have a vb script that starts an exe (or even a process without gui):

strCom = "Start calc"  
WSHShell.Run(strCom)  

It doesn't start the program, when I open task manager I can't see it.
But when I write the command "Start calc" directly in the command line it opens it.

How can I do it using the script?

like image 832
Boris Raznikov Avatar asked Oct 23 '11 12:10

Boris Raznikov


1 Answers

start is built-in to cmd.exe; it's not an actual program.

WSHShell.Run takes a physical file , not a cmd built-in.

Therefore, you can write WSHShell.Run("calc.exe")

like image 61
SLaks Avatar answered Oct 31 '22 15:10

SLaks