Keystrokes command doesn't work on RDP Sessions - automationanywhere

When I schedule a task, the Keystroke commands doesn't work, other commands like Object clonning, Log to file works fine, but Keystroke do not work.
Each Keystroke has identified the window where it should be executed. I do not know what it could be. Any Idea?
The AA version is 10.5

More than likely, you're being limited by Windows UAC (User Access Control) and DEP (Data Execution Prevention). Please see AA's documentation here for their suggestions on these two items.

Related

Sending Text to Command Prompt when opened as Administrator

I've managed to open Command Prompt "CMD" as Administrator
Issue is when i try to send keystrokes to it nothing happens
I tried opening CMD normally (not as administrator), it works okay
Any idea how can i make this work?
Thanks
After some digging, I think you're experiencing this do to either a malware/virus defender on your machine or a Windows UAC (User Access Control) setting. Also, try changing the elevated command prompt options like these here and see if changing QuickEdit Mode or Insert Mode has any effect on the automation anywhere control of the window. If it is determined to be a UAC issue, please refer to AA's suggestions on that here.

How can I stop executing .wlua files?

Is it possible to force stop a .wlua file? I figured that I would have to use the Lua Command Line to do this, but I can't seem to find out how to stop them.
If it's possible, how can it be done?
Because wlua.exe doesn't open the console window (that's the purpose) and you can't send Ctrl-C, the only way to terminate such application is to use Processes window in Task Manager. Note, however, that the process name will be wlua.exe for every file opened that way.
Of course, it's meant only to be used when the application isn't responding. Your GUI application should provide a way to close it, such as close button, listening for ESC key etc.

How to delete a file that is using by windows?

Is there any way to delete a file when its using by any program or other process in windows?
I searched and found this 2 ways:
1- using RunOnce key in Registry;
I'm not gonna use this because i dont want to wait for windows restart or anything else... prefer to do it ontime!
2- using the way declared in this page: http://www.delphipages.com/forum/showthread.php?t=201190
the problem here is its useful under NT windows, i need a way works on all Windowses!
Thank you.
the problem here is its useful under NT windows, i need a way works on all Windowses!
All modern desktop Windowses (XP, Vista, 7) are also NT. Do you really need to work with NT<4 or Win98? Or even Win CE/Mobile/Phone? Probably not.
If you need to delete an open file straight away, about the only thing you can do is attach to each process using debugger privileges, see if it has any handles open on the file, and if so close them underneath it. You can do this the manual way using eg Process Explorer. Many applications won't react well to having their files closed on them; expect them to exception out when they try to do something with the dead handle.
Unfortunately there is no option in Windows to have Unix-style files that can exist attached to a file handle independently of being stored under a filename on disc.
You cant delete a file when someone is using it. No matter how hard you try, windows will not let you. It can work with some files, but in general it does not work.
What you can try is postpone the deletion, when no one is using the file. You can:
1 - use RunOnce, but you dont want that.
2 - Wait in a loop, trying to delete the file. Pseudo code:
DeleteFile
Check if you was able to delete or if file still exists.
if you are able to delete, then exit loop.
That is the best you can do, and what i could remeber.
Try MoveFileEx with MOVEFILE_DELAY_UNTIL_REBOOT flag. Will postpone move or delete action until reboot.
Edit:
If you don't whant to restart the only option is to close those handles. ProcessExplorer does that and works all the time and I have not seen any process to crash. See more info about enumeration handles in a process at
http://www.codeguru.com/forum/archive/index.php/t-176997.html. But keep in mint that you should enumerate all processes in the system and behave different on Vista+ (you need to be elevated)
Your files are most likely locked because some process has a handle open to them. That is the most common reason for the Access denied result when deleting or moving a file.
A really blunt way is to close that handle.
Then Handles tool from SysInternals (you can download the sources too) can do that for you: I have been successfully using that.
Note 1: You need administrative privileges to use it.
Note 2: Closing a handle from another process is considered very rude, and can make that process unstable.

Detecting if a process is started by IE in protected mode

I am writing a program that is used for simplifying the download of an application installer. The app is really simple in it's working: it just asks the BITS subsystem to download a ZIP from the net and decompress it on the user's desktop and run the second stage installer (the idea is that many of our end users are too dumb to be trusted with a ZIP download link and instructions on how to install the program).
Now, if a user runs IE 7+ in Vista/7, has UAC enabled and selects "execute" instead of "save as", then the program fails. In fact, all attempts to write to the file system or the registry fails due to IE's protected mode.
In order to work around this, I've tagged the executable to trigger a UAC prompt, which works fine. However, it will now trigger the prompt even if that trigger is unnecessary: the program is designed to do the download in the background and resume downloads if the user closes his session before it is done. Now, the UAC prompt is triggered every time the executable is launched.
I would like to detect the fact that I'm running inside the sandbox and, in that case, restart the process, this time with a UAC prompt (easy enough to do). I don't know how I can detect that situation, however, short of attempting to write to the registry.
Any idea ?
Call the IEIsProtectedModeProcess function.
A good document covering IE's protected mode is Understanding and Working in Protected Mode Internet Explorer.

How can I detect a debugger or other tool that might be analysing my software?

A very simple situation. I'm working on an application in Delphi 2007 which is often compiled as 'Release' but still runs under a debugger. And occasionally it will run under SilkTest too, for regression testing. While this is quite fun I want to do something special...
I want to detect if my application is running within a debugger/regression-tester and if that's the case, I want the application to know which tool is used! (Thus, when the application crashes, I could report this information in it's error report.)
Any suggestions, solutions?
You can check the parent process that started your application.
With CreateToolhelp32Snapshot/Process32First/Process32Next get the parent PID (PROCESSENTRY32.th32ParentProcessID or TProcessEntry32.th32ParentProcessID) for your application PID. Then get the filename for the parent PID to compare with the applications you want to check for, like SilkTest.
Check this article for code usage.
In addition to IsDebuggerPresent and CheckRemoteDebuggerPresent, you can also query PEB.BeingDebugged (PEB is Process Environment Block, to get PEB you must query TEB, which is the Thread Enviroment Block).
You're probably looking for the IsDebuggerPresent function.
To detect SilkTest, you could try to attach to a DLL which is used only by SilkTest in order to detect its presence. For example, if the Open Agent is attached to a process, Win32HookDll_x86.dll or Win32HookDll_amd64.dll will be present (the names can be easily found out with a tool like Process Explorer.
You can also do
if DebugHook <> 0 then ...

Resources