Modify

Opened 14 years ago

Closed 14 years ago

Last modified 8 years ago

#1346 closed Bug (No Bug)

Send doesn't work with windows opened under another user

Reported by: podws@… 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)

comment:1 follow-up: Changed 14 years ago by Valik

  • Resolution set to No Bug
  • Status changed from new to closed

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.

comment:2 in reply to: ↑ 1 Changed 14 years ago by anonymous

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")





comment:3 follow-up: Changed 14 years ago by 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.

comment:4 in reply to: ↑ 3 Changed 14 years ago by anonymous

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 Changed 8 years ago by stefanw

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 :)

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.