Debugging an EXE running under the .Default user

I have an EXE (a screensaver SCR file, which is a special kind of EXE) which runs under the .Default user (e.g. when nobody is logged in, and Windows is sitting at the Login screen). It’s not running correctly.

When I’m running a EXE under a logged-in user, I know of several ways to debug:

How do I debug an app that runs when nobody is logged in?

Write the debug messages out to a text file which would you can then read either from another user login or on another computer via a network share.

Extensive logs or… Can you get it and make a foreground version of this background one and debug it simulating its activation?

  • log to a file: good idea, and it does look as if there is a “Default” user folder tree inside C:\Users - can my app write to it? I will test
  • make a foreground version: the EXE works great, it’s only in this particular case (running in the Default user with the Lock Screen showing) where it malfunctions, so I think I do need to test it “in vivo”

Create a C:\Debug folder, give it extensive writing permissions, log things there. Ending this job you can remove it.