Jump to content
Sign in to follow this  
Ernst

How to perform actions on msra.exe

Recommended Posts

Hi,

I've been using AutoIt for multiple years now and I've always been able to script the actions I needed...
But now I'm stuck.
For my work I need to remote takeover machines with "c:\windows\system32\msra.exe /offerra".
I created a script with a gui with buttons. Every last 5 successful takeovers are placed on buttons with their computer number.
So far so good...

What I want to do is to remember the de last position of the remote takeover session and place the next session on those positions.
Some how I'm totally unable to move or resize the session of MSRA.exe or any window of msra.exe.

Let's talk about the first screen of "c:\windows\system32\msra.exe /offerra".
WinMove is not working. Mouseclicks are not working, not even with multiple clicks and increased delay.
Tried Title, Handle, Class, Handle from Pid and what not...

Is there a possibility that some windows cannot be moved/resized, whatever the method used is?
Who can help me to understand what to do to move/resize "c:\windows\system32\msra.exe /offerra"?

 

 

 

Share this post


Link to post
Share on other sites

Oh sorry.

I’m testing iT at home with Windows 10. At work we are using Windows 7 at the moment, but I’m experiencing the same problems there, although I have not tried all options I already tried at home. 

I know it is hard to manipulatie the Window, but with physical mouseclicks and drags the window can be manipulated...

Share this post


Link to post
Share on other sites

As far as I understand the article is about using msra and it’s options. If you are referring to the operation systems mentioned, msra.exe /offerra is working on a Windows 10 machine.

I only need a way to manipulate the windows of msra.exe. If there is a way to move the opening window of msra.exe /offerra, the same method can probably be used for the other windows.

Share this post


Link to post
Share on other sites

Hi Ernst,

I don't have an answer for you, but this little piece of code explains your issue. It shows it does recognizes the window but doesn't move is:

run('"c:\windows\system32\msra.exe" /offerra')
$Hwd=WinWait("[CLASS:NativeHWNDHost]","")
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $Hwd = ' & $Hwd & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
$rc=WinActivate("[CLASS:NativeHWNDHost]","")
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $rc = ' & $rc & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
$rc=WinMove("[CLASS:NativeHWNDHost]","",1,1)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $rc = ' & $rc & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

The WinWait and WinActivate work fine, and even the WinMove reports the proper handle back without an Error. 

Jos 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Exactly Jos! Strange behaviour. IT looks like the window is responding to the winmove, but isn’t moving at all...

Physical mouse action can move the window. Is there any way to trick Windows accepting autoit mouse actions?

Share this post


Link to post
Share on other sites

Thanks for your helpful reply.

I didn’t try #RequireAdmin as at the office I don’t have an Admin account.

It is not exactly what I’m looking for though, but it is a step in the right direction.

What in Windows is causing this behaviour as the actions I want to execute normally don’t require Admin credentials.

Is there another way to get around this?

Share this post


Link to post
Share on other sites

What operating system are you talking about? With windows 10 I know you have to do something in the registry and Disable UAC

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
Just now, Earthshine said:

What operating system are you talking about

echo..  :)  (post #2)


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...