using System.Runtime.InteropServices;
public struct ShellExecuteInfo
{
public int cbSize;
public uint fMask;
public IntPtr hwnd;
public string lpVerb;
public string lpFile;
public string lpParameters;
public string lpDirectory;
public int nShow;
public int hInstApp;
public int lpIDList;
public string lpClass;
public int hkeyClass;
public uint dwHotKey;
public int hIcon;
public int hProcess;
}
public const int SW_SHOW= 5;
public const uint SEE_MASK_INVOKEIDLIST= 12;
[DllImport("shell32.dll")]
public static extern bool ShellExecuteEx(ref ShellExecuteInfo lpExecInfo);
private void button1_Click(object sender, EventArgs e)
{
ShellExecuteInfo vShellExecuteInfo = new ShellExecuteInfo();
vShellExecuteInfo.cbSize = Marshal.SizeOf(vShellExecuteInfo);
vShellExecuteInfo.lpVerb = "properties";
vShellExecuteInfo.lpFile = @"c:/temp/temp.log";
vShellExecuteInfo.nShow = SW_SHOW;
vShellExecuteInfo.fMask = SEE_MASK_INVOKEIDLIST;
ShellExecuteEx(ref vShellExecuteInfo);
}