I have been wondering how to provide command line arguments to a application on startup.
I mean what to type in the code, so that a registry entry is created which supplies the command line args:- I have been using the following code, to create a registry entry(so that application launches on startup.
using Microsoft.Win32;
private void SetStartup()
{
RegistryKey rk = Registry.CurrentUser.OpenSubKey
("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
rk.SetValue(AppName, Application.ExecutablePath.ToString());
}
Can anyone tell me what parameter I should modify in
rk.SetValue()
function's arguments to supply command line arguements to my app.