I'd like to start by thanking you for this tool. I've setup for the app to start at startup. However, this is the error that I see in the event viewer:
Log Name: Application
Source: .NET Runtime
Date: 3/21/2022 11:23:08
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: DESKTOP-KLDMP0F
Description:
Application: VirtualDesktopIndicator.exe
CoreCLR Version: 6.0.322.12309
.NET Version: 6.0.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException: The type initializer for 'VirtualDesktopIndicator.Config.UserConfig' threw an exception.
---> System.UnauthorizedAccessException: Access to the path 'C:\WINDOWS\system32\vdi_config.json' is denied.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.File.WriteAllText(String path, String contents)
at VirtualDesktopIndicator.Config.UserConfig.Save() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 51
at VirtualDesktopIndicator.Config.UserConfig.LoadFromFile(String path) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 38
at VirtualDesktopIndicator.Config.UserConfig..cctor() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 8
--- End of inner exception stack trace ---
at VirtualDesktopIndicator.Config.UserConfig.get_Current() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 8
at VirtualDesktopIndicator.Components.DesktopNotifyIcon.get_FontName() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 77
at VirtualDesktopIndicator.Components.DesktopNotifyIcon..ctor(IVirtualDesktopManager virtualDesktop) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 109
at VirtualDesktopIndicator.Program.Main() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Program.cs:line 15
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2022-03-21T16:23:08.2517747Z" />
<EventRecordID>39490</EventRecordID>
<Correlation />
<Execution ProcessID="21120" ThreadID="0" />
<Channel>Application</Channel>
<Computer>DESKTOP-KLDMP0F</Computer>
<Security />
</System>
<EventData>
<Data>Application: VirtualDesktopIndicator.exe
CoreCLR Version: 6.0.322.12309
.NET Version: 6.0.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException: The type initializer for 'VirtualDesktopIndicator.Config.UserConfig' threw an exception.
---> System.UnauthorizedAccessException: Access to the path 'C:\WINDOWS\system32\vdi_config.json' is denied.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.File.WriteAllText(String path, String contents)
at VirtualDesktopIndicator.Config.UserConfig.Save() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 51
at VirtualDesktopIndicator.Config.UserConfig.LoadFromFile(String path) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 38
at VirtualDesktopIndicator.Config.UserConfig..cctor() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 8
--- End of inner exception stack trace ---
at VirtualDesktopIndicator.Config.UserConfig.get_Current() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 8
at VirtualDesktopIndicator.Components.DesktopNotifyIcon.get_FontName() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 77
at VirtualDesktopIndicator.Components.DesktopNotifyIcon..ctor(IVirtualDesktopManager virtualDesktop) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 109
at VirtualDesktopIndicator.Program.Main() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Program.cs:line 15
</Data>
</EventData>
</Event>
I'd like to start by thanking you for this tool. I've setup for the app to start at startup. However, this is the error that I see in the event viewer:
This error log is followed by another error log: