The path needs to have escaped quotes around it if it contains spaces. Alternately, for Program Files
directory, you can also use this:
Runtime.getRuntime().exec("C:\\Progra~1\\AutoIt3\\autoit3.exe ./WindowsAuthenticationLogin.au3");
Pregunta
I am trying to use
Runtime.getRuntime().exec("C:\\Program Files\\AutoIt3\\autoit3.exe ./WindowsAuthenticationLogin.au3");
in java
But failing and displaying fail message as
Cannot run program "C:\Program"
Please tell me how can I give correct path to make it work
Solución 2
The path needs to have escaped quotes around it if it contains spaces. Alternately, for Program Files
directory, you can also use this:
Runtime.getRuntime().exec("C:\\Progra~1\\AutoIt3\\autoit3.exe ./WindowsAuthenticationLogin.au3");
Otros consejos
you need to escape the first space with \\
Runtime.getRuntime().exec("C:\\Program\\ Files\\AutoIt3\\autoit3.exe ./WindowsAuthenticationLogin.au3");