Hi BreakPoint,
Thanks for your solution, I got it and added code as follows :
IWshRuntimeLibrary.WshShell shell = new IWshRuntimeLibrary.WshShell();
IWshRuntimeLibrary.IWshShortcut shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(strStartup + "\\filename.lnk");
shortcut.TargetPath = Application.ResourceAssembly.Location;
shortcut.WindowStyle = 1;
shortcut.Arguments = "startup";
shortcut.IconLocation = appStartPath + "\\logo.ico";
shortcut.Save();
After this change I can able to get value from following function,
public static bool StartupFlag=false;
protected override void OnStartup(StartupEventArgs e)
{
if (e.Args.Length == 1 && e.Args[0] == "startup")
{
StartupFlag = true;
}
else
{
StartupFlag = false;
}
}