How do I make my program check if it launched with given options like this
"C:\bla\blabla\myapp\myapp.exe" -NoUpdateCheck -NoInt
or
"C:\bla\blabla\myapp\myshortcut.lnk" -NoUpdateCheck -NoInt
Or just with one option.
How do I make my program check if it launched with given options like this
"C:\bla\blabla\myapp\myapp.exe" -NoUpdateCheck -NoInt
or
"C:\bla\blabla\myapp\myshortcut.lnk" -NoUpdateCheck -NoInt
Or just with one option.
You use System.Environment.Commandline to read the full command line and parse it.
Use a command line argument parser and save yourself from re-inventing the wheel. I use this one for everything : http://commandlinearguments.codeplex.com/