System can't find the path specified

uiautomation
studio
error

#1

Hi all ,

I’ve bot which finally finds the location .bat file located in a path. When am printing the path in writeline to debug ,it’s giving correct path.The same path am storing a variable and gibing as input to the start process it’s giving error like “System cannot find the path specified” -Win32 exception.

So it could not run the batch file.

Please help me.

Thanks

newscript_implement999.xaml (13.5 KB)


System cannot find the path specified
#2

Hello there,

In Start Process, try something like this.

file name : "C:\WINDOWS\Explorer.EXE"
arguments: your .bat file path (eg: “C:\new.bat”)


#3

I tried but still is not working.It’s Opening windows Explorer but not executing the .bat file .When i’m giving the .bat file path directly it’s getting executed.

Please help me


#4

The path which is coming on the console i stored in varible.In the start process am passing the varible in FileName property .Then it’s giving the error.

Please check the screenshot


#5

Ok .
First point Filename should be .exe you can’t pass any other extension here.
This is where argument comes in picture.
It’s working fine for me.

Directly means where you passing? in start process ,argument or filename field.

PS: why your passing start process inside for each when you already have batch file location in the variable (batlocation.ToString)