Jump to content

Recommended Posts

Posted

I know how to create a task to run on a specific date at a specific time

how can I create a task to run at login?

Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

Posted (edited)

Clarification: How can I schedule a task to run the next time the user logs in, whenever that is?

Edited by c.haslam
Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

Posted

I am writing an AutoIt script that is an appointment reminder. It calls upon TaskScheduler to remind the user of appointments, etc.

It already works for reminders, i.e. shows a message box::

  • on a date and time (e.g. 2024-10-21 at 6 pm)
  • ,every day of the week at a time (e.g. every Tuesday at 8 pm),
  • n days before the first of each month at a time (e.g. 10 days before the first of each month at 6 am) , and
  • on the nth day of each month at a time (e.g. day 5 of each month).

The user gets to specify which of these he wants, and when. His wishes are stored in the Arguments part of the task definition.

I wish to extend this to:

  • when the user at logs in on a date
  • when the user  log in every day of the week (e.g. at login on Tuesdays)
  • when the user at logs in n days before the first of each month
  • when the user at logs in on the nth day of each month

I would also like to extend this to having the script show a reminder (in a message box) each time the user logs in.

 

 

Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

Posted

If it's just for one user on one PC, use the user part of the registry:

 

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

the first will do its job on each and every login, the other one just for the next login.

 

If you want this for any user loggin in, use HKLM instead of HKCU

Have a look at this post as well.

 

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Posted
On 8/19/2024 at 3:37 AM, c.haslam said:

I wish to extend this to:

  • when the user at logs in on a date
  • when the user  log in every day of the week (e.g. at login on Tuesdays)
  • when the user at logs in n days before the first of each month
  • when the user at logs in on the nth day of each month

I would use the Windows Task scheduler to create the needed Tasks (I'm not sure TaskScheduler supports everything you are looking for).
Then export the XML and either use my TaskScheduler UDF or your own script to create and modify (change date, number of dayss ...) your tasks.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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
×
×
  • Create New...