Environment Variables when running a .NET app as a screensaver RRS feed

  • Question

  • I have a .NET application that runs in various modes, full screen, windowed and screensaver. This app relies on data that is saved to the user application data. To resolve this path we use the %APPDATA% environment variables. This works fine with the non-screensaver modes but in screensaver mode the appdata variable is sometimes unavailable. Obviously it is not available before logon but the issue is present when the user is logged-on on some machines. The issue is more common on Window 7 but has been known to happen in Windows XP. Is there a windows security setting or something that would cause us to not be able to access the %appdata% variable when running as a screensaver?
    Tuesday, January 24, 2012 10:00 AM

All replies

  • In some Windows OS the screensaver run in the system context
    Tuesday, January 24, 2012 1:01 PM
  • Is there a specific setting for this I have missed? I have seen the issue happen on both Windows 7 and XP, but I have also seen it work perfectly on other installations of 7 and XP.
    Tuesday, January 24, 2012 1:28 PM
  • Could you please show us code snippet how you use "the %APPDATA% environment variables" in screensaver mode?

    It is better to reproduce this issue with the code so that we may provide a better response.

    Have a nice day.

    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Thursday, January 26, 2012 9:00 AM