Opened on Dec 15, 2009 at 3:28:39 PM
Closed on Dec 15, 2009 at 5:42:36 PM
Last modified on Feb 7, 2016 at 6:46:34 PM
#1346 closed Bug (No Bug)
Send doesn't work with windows opened under another user
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.0.0 | Severity: | None |
| Keywords: | send user | Cc: |
Description
Send doesn't work with windows opened under another user.
Following "send' doesn't do anything:
RunAs($AccountLocalName, $AccountLocalDomain, $AccountLocalPassword, 0, "notepad.exe")
WinWait("Notepad")
WinActivate("Notepad")
Send('!f')
Attachments (0)
Change History (5)
follow-up: 2 comment:1 by , on Dec 15, 2009 at 5:42:36 PM
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:2 by , on Dec 17, 2009 at 1:55:18 PM
Replying to Valik:
I suggest you debug your code a bit further. There is a mistake in your code and once you correct that it will work just fine.
Dear Valik,
thanks for reply, the code is not complete, but I spend half hour with this issue, so I thing it has to be a bug:-)
AutoItSetOption("WinTitleMatchMode", 2)
$AccountLocalName = "Administrator"
$AccountLocalDomain = @ComputerName
$AccountLocalPassword = "Password123"
RunAs($AccountLocalName, $AccountLocalDomain, $AccountLocalPassword, 0, "notepad.exe")
WinWait("Notepad")
WinActivate("Notepad")
Send("!f")
follow-up: 4 comment:3 by , on Dec 17, 2009 at 6:06:55 PM
Okay, so this time you actually provided the crucially important "WinTitleMatchMode" line which fixes the mistake I found in your first attempt. Now that you've corrected that... it works just fine. I plugged in suitable account credentials for my Windows XP SP3 machine, Notepad popped up as the other user and the file menu appeared.
comment:4 by , on Dec 21, 2009 at 9:35:10 AM
Replying to Valik:
Okay, so this time you actually provided the crucially important "WinTitleMatchMode" line which fixes the mistake I found in your first attempt. Now that you've corrected that... it works just fine. I plugged in suitable account credentials for my Windows XP SP3 machine, Notepad popped up as the other user and the file menu appeared.
Dear Valik,
I have used AutoIt for 8 years, so "WinTitleMatchMode" I use automatically, thas why I didn't put it in source code.:-)
Well, I didn't tested it on XP. I moved to Windows Vista Enterprise, SP1. Maybe problem will be something with UAC. I tried 3 computers with Microsoft Vista, the same result - it doesn't work.
comment:5 by , on Feb 7, 2016 at 6:46:34 PM
Windows7 x64
AutoIt3_x64.exe V3.3.12.0
I just spent much time to find the "bug" in my code.
It was able to find the msg-window and it could extract text, but sending CTRL+C (copy msg to clipboard) or ENTER or mouse clicks to close it did not work.
IMHO the "bug" in Autoit (or just the thing missing) is an error or warning message to the console like "Can not send commands to process running as different user" or "as admin user".
At least there should be a big warning in "Send" (and similar) documentation.
Thank you :)

I suggest you debug your code a bit further. There is a mistake in your code and once you correct that it will work just fine.