looking for some solutions? You are welcome.

SOLVED: Process.Start Notepad++ from a Windows service does not behave as expected


I start a file by default text editor by coding

// filePath is path to text file
// Example: C:\UserData\logs\abc.log

If I set default editor of log file is notepad, wordpad, it work ok.
But if I set default editor is Notepad++, It will show messagebox:

  1. Load langs.xml failed!
  2. Load stylers.xml failed!

Another, If I open this text file by Notepad++ by double-click, it work ok. These errors only show when I open file by C# code.


  1. .NET framework 4.7.1
  2. Windows 10 32-bit
  3. Notepad++ 7.6.4 (32-bit)
  4. Application is started by Windows Service as same as Logon Session of active user.

enter image description here

How can I solve this issue?

Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots

No comments: