I have a text file named "Config.txt". when my application starts it will be read as contained in the file and load settings. I use Registry for my application startup with windows. code below:
RegistryKey rk = Registry.CurrentUser.OpenSubKey
("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
if (checkStartup.Checked)
rk.SetValue("MyApplication", Application.ExecutablePath);
else
rk.DeleteValue("MyApplication", false);
Code is running. But when my application runs it doesn't read the config. results in all settings being null.If I click manual application run normal :D . Please advise on other solutions.