I have been looking for a while on the net "how to create a scheduled task to logon (only after the current user has logged in)" but unfortunately without success
Well I found a lot of scripts that makes repetitive tasks, but in my case I found nothing.
For example here is a script that runs Notepad at 12:30 on Mondays, Wednesdays and Fridays.
So I'm looking for a way to modify this script or another script to achieve my final goal
Thank you !
Well I found a lot of scripts that makes repetitive tasks, but in my case I found nothing.
For example here is a script that runs Notepad at 12:30 on Mondays, Wednesdays and Fridays.
Code:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
errJobCreated = objNewJob.Create _
("Notepad.exe", "********123000.000000-420", _
True , 1 OR 4 OR 16, , , JobID)
Wscript.Echo errJobCreated
Thank you !