Hi,
I am trying to use an AutoIt application run from PSEXEC.EXE on a Windows 2008 R2 server but have come across a problem with ControlSetText().
The Windows 2008 R2 server has User Account Control (UAC) disabled.
The problem can be demonstrated with the following AutoIt code. Compile the following AutoIT to an executable, say "test.exe".
WinActivate("[CLASS:Notepad]") WinWaitActive("[CLASS:Notepad]") ControlSetText("[CLASS:Notepad]", "", "Edit1", "This is some test text")
On the 2008 R2 server start two cmd.exe A and B.
On cmd.exe A, type the following
psexec.exe \\127.0.0.1 -u <username> -p <password> -i 1 cmd.exe
using the same username and password as used to login.
Another cmd.exe window C appears.
Now start notepad on cmd.exe B.
notepad.exe
Run the AutoIt script from cmd.exe C
test.exe
and no text appears in the the notepad window.
Run the same AutoIt script from cmd.exe B
test.exe
and the text "This is some test text" is written to notepad.
Quit notepad and now start it again but this time from cmd.exe C.
This time the application test.exe only works if run from cmd.exe C. It seems to be a permissions problem but I can find no difference in permissions between cmd.exe B and C. Does anyone have any ideas what the problem might be?