Simple DOS Batch File does not execute from Task Scheduler

Copper Contributor

I have a very simple Reg Export Bat file the exports a registry key and then copies it to a backup directory.  The Bat file runs perfectly if I manually start it via File Explorer, however when I try to execute the file daily from Task Scheduler the Scheduler reports the task as completed , however, does not execute the export and copy.  I included some timeouts in the batch file to see if it was a timing issue, however, that did not resolve the issue.  

 

Is there some permission or admin right that needs to be turned on?  I have tried to run this under my admin account, a scheduler admin account and the Windows admin account and the effect is the same.

 

I have attached copies of the bat file (in PDF format) and a zip file of the task scheduler setup.

 

I am running:

Device name OfficeDell
Processor 11th Gen Intel(R) Core(TM) i9-11900K @ 3.50GHz 3.40 GHz
Installed RAM 128 GB (128 GB usable)
Device ID 81E404FB-8AEC-42A0-BD58-204F6EF2DDD0
Product ID 00330-70000-00002-AAOEM
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display

Windows:

Edition Windows 11 Pro
Version 22H2
Installed on ‎10/‎13/‎2022
OS build 22623.1180
Experience Windows Feature Experience Pack 1000.22638.1000.0

 

Any help would be appreciated.

Daryl

3 Replies

Hi @NWA-DMB 

This is the Windows Beta version, does it work in a stable build of Windows?

Hi, thanks for the suggestion. I do not have another computer running a released version of Windows, however, I ran the bat file, although I had to point to another HKCU, in a virtual machine running a released version and it worked OK. Does this lead us to believe that it is an issue with the beta version of task scheduler?

Is there another tool or method to try and run a scheduled job like this? I tried schtasks also and it did not work either.  are there any good task schedulers form other vendors you could suggest?

 

 

@NWA-DMB 

No, some settings cannot be modified, copied, etc. 

There may be a workaround, but it requires you to change permissions on the object.

Best regards