URL parameters
URL/WindowsFormsApplication2.application?username=test
Publish Options
Checked [/] Allow URL parameters to be passed to application
Application clickonce
if (ApplicationDeployment.IsNetworkDeployed && ApplicationDeployment.CurrentDeployment.ActivationUri != null) { string query = HttpUtility.UrlDecode( ApplicationDeployment.CurrentDeployment.ActivationUri.Query); if (!string.IsNullOrEmpty(query) && query.StartsWith("?")) { string[] arguments = query.Substring(1).Split(' '); string[] commandLineArgs = new string[arguments.Length + 1]; commandLineArgs[0] = Environment.GetCommandLineArgs()[0]; arguments.CopyTo(commandLineArgs, 1); MessageBox.Show(commandLineArgs.ToString(),"TEST"); }