Asmita

AutoIT file upload does not work when remote machine is disconnected

4 posts in this topic

Hi All,

I have implemented the AutoIt feature to upload file with below approaches.

Basically my requirement is that the file upload script should work even when I execute the script on remote machine while the remote machine is disconnected

1. Used Selenium ROBOT class,But works only when window is active

2. The below approach only works when window is active,But does not work when remote machine is disconnected

WinWaitActive("Open")
ControlSend("filepath")
Send("{Enter}")

3. The below approach did not work in any condition

WinWaitActive("File Upload")
ControlFocus("File Upload","","ComboBox1")
Sleep(5000)
ControlSend("File Upload","","","filepath")
Sleep(5000)
Send("{ENTER}")

4. Also tried with ControlText command,But did not work in any condition

Can anyone help me on getting this done.

Thanks for your help in advance!!

Regards,

Asmita

Share this post


Link to post
Share on other sites



If I understand correctly you can't upload to the remote machine because it's disconnected. If that's the case I don't understand 1-4. Based on #1 I don't think you mean disconnected but mean active.

Could you clarify? Is your script failing because the machine is disconnected/unreachable or does the upload fail because it only works when the window is active and you're trying to process in the background?

Share this post


Link to post
Share on other sites

I have placed my script code on remote machine.And trying to execute the script there.

Basically I connect to my remote desktop -->Execute scripte using bat file-->disconnect desktop

Share this post


Link to post
Share on other sites

A window cannot be 'active' when not on the desktop...run it in the background, and don't use winwaitactive.

https://www.autoitscript.com/wiki/FAQ#Why_doesn.27t_my_script_work_on_a_locked_workstation.3F

You can even initiated via paexec...no need to remote into the station.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now