okay so i have this button
private void button2_Click(object sender, EventArgs e)
{
OpenFileDialog fDialog = new OpenFileDialog();
fDialog.Title = "Open Injector";
fDialog.Filter = fDialog.Filter = "Exe Files|*.exe";
fDialog.InitialDirectory = @"C:\";
if (fDialog.ShowDialog() == DialogResult.OK)
{
MessageBox.Show(fDialog.FileName.ToString());
fDialog.CheckFileExists = true;
fDialog.CheckPathExists = true;
}
string str = fDialog.FileName;
Process process = new Process();
process.StartInfo.FileName = str;
process.Start(); ;
{
string str1 = @"C:\Nexon\MapleStory\GameLauncher.exe";
Process process1 = new Process();
process1.StartInfo.FileName = str1;
process1.Start();
}
}
and the problem is that only in windows 7 and vista it works with right click run as admin,and for xp its works finr like this.
how shall i check for the os and run as admin