Sign in to follow this  
Followers 0
Grefven

Run script (Non-GUI) as another user via scheduler

2 posts in this topic

I have been searching and reading all about scheduled tasks and GUI based programs for the last hour and a half, but have not yet found a solution.

Scenario:

I have 2 emergency computers that every afternoon downloads an otherwise online database to local drive.

The computers are connected to network and always powered on.

If database servers down during the night, one can disconnect the emergency computers that has entire database downloaded, and use it until servers are back up again.

Download starts 1 hour before server maintenance ppl go home and is usually completed within 30 minutes.

I want to automate this in the following way:

* Schedule a program (written in autoit) that has no GUI that does the download and config of database. (This program exists and works flawlessly.)

* The program must be run as administrator. Current logged on user is not administrator.

* Send a message to the current logged in user to not disconnect or power down, as the copy is now in progress.

* Remove the message when the copy is complete.

What I really need is a way to, when my autoit program is "run as" SYSTEM or -admin account by task scheduler, tell current logged is user what is happening.

Basically, send a message from admin user to non-admin user from an autoit program run as scheduled task.

Is it possible?

/Tomas, Sweden

Share this post


Link to post
Share on other sites



You could run your compiled script as a service.

How to create a service can be found here.

A service can interact with the desktop.

Haven't done it myself, so unfortunately I have no more information about this. But I'm sure the forum has ;)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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  
Followers 0