Run Program or Script at Start - Task Scheduler


Author
Message
JimW
JimW
New Member
New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)
Group: Forum Members
Posts: 15, Visits: 34
I'm trying to "Run program at start" (call it myprogram.exe). Everything works when I run the backup.vbs manually but when I Schedule it myprogram.exe runs as a background process and doesn't work.

The task in Windows Task Scheduler is set to "Run Whether user is logged on or not" but if I try to change it I get:

"Task Scheduler cannot apply your changes.
The user account is unknown, the password is incorrect,
or the account does not have permission to modify the task."

I've tried run Task Scheduler as admin, My Local Account is set to Administrator, Password protected... nothing works.
I can edit any other tasks just not Macrium tasks.

Windows 10 Pro Version 1709 OS Build 16299.547
No AV, just using Windows Defender.

I'm stuck.
jphughan
jphughan
Macrium Evangelist
Macrium Evangelist (6.9K reputation)Macrium Evangelist (6.9K reputation)Macrium Evangelist (6.9K reputation)Macrium Evangelist (6.9K reputation)Macrium Evangelist (6.9K reputation)Macrium Evangelist (6.9K reputation)Macrium Evangelist (6.9K reputation)Macrium Evangelist (6.9K reputation)Macrium Evangelist (6.9K reputation)
Group: Forum Members
Posts: 4.7K, Visits: 34K
Tasks created by Reflect by default use the built-in SYSTEM account and aren't meant to be edited directly.  You can try going to Edit Defaults > User and setting up a "real" admin account as the task owner to see if you can then do what you want in Task Scheduler, although your custom changes might get overwritten if you ever make changes within Reflect that affect the scheduled tasks, such as adjusting the schedule.  But the proper way to do what you want is to have Reflect generate a script that calls your definition file, which you can do by right-clicking the definition file and choosing "Generate [script language of choice] script".  Macrium recommends VBScript and PowerShell.  During the wizard that pops up when you make that selection, you can specify a program to run before and/or after the script executes.  Once you generate your script, associate your scheduled backups with the script (you'll find it under the "[Script Type] Scripts" tab) rather than the definition file, and as long as your EXE supports being run non-interactively, it should be fine.  You can also of course directly customize that script outside of Reflect if desired.

JimW
JimW
New Member
New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)New Member (37 reputation)
Group: Forum Members
Posts: 15, Visits: 34
jphughan - 13 August 2018 1:26 PM
But the proper way to do what you want is to have Reflect generate a script that calls your definition file, which you can do by right-clicking the definition file and choosing "Generate [script language of choice] script".  Macrium recommends VBScript and PowerShell.  During the wizard that pops up when you make that selection, you can specify a program to run before and/or after the script executes.  Once you generate your script, associate your scheduled backups with the script (you'll find it under the "[Script Type] Scripts" tab) rather than the definition file, and as long as your EXE supports being run non-interactively, it should be fine.  You can also of course directly customize that script outside of Reflect if desired.

I've been using Reflect for several years and always have Reflect generate a script that calls the definition file then schedule the script.
It seems that any task in Windows Task Scheduler with "Run Whether user is logged on or not" it will run it as a background process.
Other backup software (EaseUS, Acronis, etc.) will run a program at start just fine, maybe it's time for a change.

Thanks


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Login

Explore
Messages
Mentions
Search