When you usually start the application by double-clicking, the working directory is usually an EXE file. This means that if you link to any configuration files in your code, they can find them.
But when you add it to the registry to start at startup, the working directory c:\windows\system32, because it is launched by the windows themselves.
:
public static string BaseDir = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
, BaseDir - exe.
, , , , :
string mySettingsFile = Path.Combine(BaseDir, "MySettingsFile.xml");