Run VB Script in Server



Hello all,

I want to run the vb script using uipath logging in to server. UiPath is in vitual machine. I have to login to citrix server and have to run the script. Is ‘Start Process’ activity works? or I have to use ‘run(Win+r)’ to run the script. Please give your responses as early as possible.

Thanks in advance.

How to start/execute a vbs-file

Yeah, use Start Process with “cscript.exe” and the .vbs file as the argument. (I’m assuming you mean it’s a .vbs file)
However, there can be problems with running it as admin if that’s needed, so you might need a powershell script to kick it off.


The .ps1 file just has this:
invoke-expression “cmd /C cscript ‘fullfilepath.vbs’”


can you please detail the approach



You can create a powershell script using Notepad but use a filetype as .ps1

The script will be like the above that I posted, but you may need the full filepaths.

invoke-expression "c:\windows\system32\cmd.exe /C c:\windows\system32\cscript.exe 'filepathofscript.vbs'"

You can also add arguments to be used in the script, but I can’t say I’m an expert; there is resources online on how to do use variables in powershell and pass them to .vbscripts though.

Hope that helps better.



thanks for input. will try this approach.


i am able to execute the vbs by using cscript.exec invoked from invokecode activity.
checking if there are options to run the cscript.exe command prompt in background