Every application got a Main method. You can access the parameters from the Main method. The Main Method is defined as : " static void Main(string[] args)", and the "args" is the parameter strings' array.
e.g. "c:\program files\applikation.exe /parameter"
So you can't use these code to determine where the application go:
static void Main(string[] args)
{
if(args.Length > 0)
{
if(args[0] == "/parameter") { /* Do things */ }
}
else { /* Do things if without parameters*/ }
}
|