TedLasso
Executive Member
- Joined
- Feb 23, 2016
- Messages
- 5,156
- Reaction score
- 2,846
As per title, I have some old software on a legacy server, which is being EOLed in 12 months.
There is a process that needs to be manually kicked off in an application . Normally, I would do it manually, and I am trying to automate the running of it.
The application does not support command line arguments and needs to interact with the desktop (so runs under the context of the service account)
So I built an AutoIT script that does what a person would do. I built the script to use keystrokes rather than mouse clicks to make it reliable. The script works even after compiled as an exe.
When I schedule it as a task , it starts (I know it does, as the application is opened when I RDP into server) but nothing happens until I sorta tap in the application window and the script continues running.
Note:- I then tried to modify the script to activate the screen to be sure it works , but while it works while I start the script process, it does not when scheduled task starts it. The task is started under the context of the local service account , which I also use to RDP into the server in.
Reading up on it, appears MS restricted the ability for scheduled tasks to interact with desktop, due to security concerns. I followed many of the resources which all seem to be from 2012-2017 on various methods to allow the scheduled task to interact with desktop, but none seem to work. Even tried psexec.
Any tips or another piece of software to initiate the task to get this done? The task needs to be run once a day if that helps.
PS. I was gonna use power automate desktop to build the RPA flow, but power automate desktop not supported on win2012
There is a process that needs to be manually kicked off in an application . Normally, I would do it manually, and I am trying to automate the running of it.
The application does not support command line arguments and needs to interact with the desktop (so runs under the context of the service account)
So I built an AutoIT script that does what a person would do. I built the script to use keystrokes rather than mouse clicks to make it reliable. The script works even after compiled as an exe.
When I schedule it as a task , it starts (I know it does, as the application is opened when I RDP into server) but nothing happens until I sorta tap in the application window and the script continues running.
Note:- I then tried to modify the script to activate the screen to be sure it works , but while it works while I start the script process, it does not when scheduled task starts it. The task is started under the context of the local service account , which I also use to RDP into the server in.
Reading up on it, appears MS restricted the ability for scheduled tasks to interact with desktop, due to security concerns. I followed many of the resources which all seem to be from 2012-2017 on various methods to allow the scheduled task to interact with desktop, but none seem to work. Even tried psexec.
Any tips or another piece of software to initiate the task to get this done? The task needs to be run once a day if that helps.
PS. I was gonna use power automate desktop to build the RPA flow, but power automate desktop not supported on win2012
Last edited: