How to pass command in Start Process activity?

I want to execute the below command in cmd.exe. So I am using Start Process with FileName as - “C:\Windows\System32\cmd.exe”

Command to be used - net start sppsvc

Hi @Mahalakshmi

Did you try to use type into (type your command) and send hotkey (enter)?

1 Like

Yes. This doesn’t work. Gives selector not found exception.


Show me your code please, with the error…


Here I see the command has not typed at all.

Exception -

System.AggregateException: One or more errors occurred. —> System.ArgumentException: Value does not fall within the expected range. at UiPath.UiBrowserClass.get_node() at UiPath.Core.Browser.get_Element() at UiPath.Core.Activities.Target.<>c__DisplayClass29_0.b__0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() — End of inner exception stack trace


You did not indicate to where “Type Into” should type…

I tried this using Attach Window of Cmd.exe and Type into Activity without any Selector.

Run the command prompt in administration mode.

@Mahalakshmi You can create a Batch file with just the command you need if you are only executing that command alone and use it in Start Process Activity, It Should work.
The Batch file is provided below :
Start System (162 Bytes)

1 Like