I am adding my aplication's exe to launch at boot like this:
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
key.SetValue("MyApp", Assembly.GetExecutingAssembly().Location);
It works, the application starts, but it is "outside" of its folder. So my methods inside of it which work with relative paths (for example if try to open "files/file.pdf" in the file reader, where the folder "files" is located in the same folder as the application's exe) work when I manually double click the exe, and it finds the file.pdf without problems, but when that same exe starts automatically during boot, thanks to the registry thing above, it is not able to find the file.pdf.
How can I make it so the application is launched in "its folder"?