1

I'm following the RunOnceEx documentation from here: https://support.microsoft.com/en-ie/help/310593/description-of-the-runonceex-registry-key

and I want it to generate a log file, so I use both log-file flags:

0x00000010 Create Error Log File Create C:\Windows\RunOnceEx.err file if errors occur 0x00000020 Create Execution Log File Create a C:\Windows\RunOnceEx.log file with status of commands

But no log files are generated.

Here's my reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnceEx]
"TITLE"="title test"
"Flags"=dword:00000030

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnceEx\0001TestRun]
@="NotePad"
"1"="||c:\\\\windows\\\\notepad.exe"

With this test, notepad gets run correctly, but no execution log-file is created.

Then for an error-test, I changed the path on the last line from "notepad.exe" to "notepad2.exe", i.e. a file that doesn't exist. Here I'm expecting an error-log to be generated to indicate an invalid path, but again no error-log gets generated.

Does anyone know why the log files specified in the documentation, RunOnceEx.log and RunOnceEx.err, are not getting generated?

  • A log file is only created if an error occurs. "Create Error Log File Create C:\Windows\RunOnceEx.err file if errors occur" – Ramhound Mar 6 '18 at 19:49
  • If you specify just 0x10 or 0x20 is a log generated? – Ramhound Mar 6 '18 at 20:07
  • @Ramhound Thanks for the suggestion. I tried specifying 0x10 and 0x20, but the same result. – padraigf Mar 7 '18 at 14:40
  • @Ramhound I would've expected an invalid path to be an error, but yes, what constitutes an error isn't specified in the documentation. It's just this type of error I'm trying to log, i.e. if for some reason the program can't be run (path, permission, etc.). – padraigf Mar 7 '18 at 14:44
  • If 00000010 and 00000020 do not function by themselfs then something else is going on and/or no errors are generated. – Ramhound Mar 7 '18 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.