I'm trying to create a script using the Macro Record feature which will begin by launching a program first. There's a problem, though. This program needs to be run as Administrator and requires UAC authorization to do so.
I did a little homework and happened upon this site which explains how to create a task using Task Scheduler, ensuring that you run it using highest privileges possible, then create a shortcut that will call that task. I thought it was a pretty elegant solution (if not exactly "secure"). I tested it out and it works great -- no UAC prompt.
The problem comes about when trying to launch this shortcut from the WinAutomation macro recording tool. I get a very unhelpful error which simply states "Failed to launch application..."
I've been playing with this for a couple of hours and have exhausted all of my options. Hopefully you guys can help.
Thanks,
Greg


I think there are many ways to do that. However, I would suggest that you do the following:
1) Right click on the tray icon (bottom right corner) of WinAutomation and select Exit WinAutomation (console must be closed for this to happen).
2) Now instead of clicking on the "WinAutomation Console" link to launch WinAutomation, right click on it and select "Run As Administrator". This will basically launch the DIAgent with administrative privileges and thus, all jobs will be executed with administrative privileges.
Do note, that in order to make all your jobs run with administrative privileges every time, you will have to make sure that the process that the process: WinAutomation.DIAgent.Exe that launches on startup, is run with administrative privileges. Basically, this is the process that determines which credentials a job will use when it is executed.
Error is not blindness, error is cowardice
Error is not blindness, error is cowardice