this.textbox1 = new system.windows.forms.textbox();
this.textbox2 = new system.windows.forms.textbox();
this.setacl = new system.windows.forms.button();
this.label1 = new system.windows.forms.label();
this.label2 = new system.windows.forms.label();
this.button1 = new system.windows.forms.button();
this.suspendlayout();
//
// textbox1
//
this.textbox1.location = new system.drawing.point(80, 32);
this.textbox1.name = "textbox1";
this.textbox1.size = new system.drawing.size(152, 21);
this.textbox1.tabindex = 0;
this.textbox1.text = "c://test";
//
// textbox2
//
this.textbox2.location = new system.drawing.point(80, 80);
this.textbox2.name = "textbox2";
this.textbox2.size = new system.drawing.size(152, 21);
this.textbox2.tabindex = 1;
this.textbox2.text = "aspnet";
//
// setacl
//
this.setacl.location = new system.drawing.point(152, 136);
this.setacl.name = "setacl";
this.setacl.tabindex = 2;
this.setacl.text = "设置";
this.setacl.click += new system.eventhandler(this.setacl_click);
//
// label1
//
this.label1.location = new system.drawing.point(24, 80);
this.label1.name = "label1";
this.label1.size = new system.drawing.size(48, 23);
this.label1.tabindex = 5;
this.label1.text = "用户:";
//
// label2
//
this.label2.location = new system.drawing.point(24, 32);
this.label2.name = "label2";
this.label2.size = new system.drawing.size(48, 23);
this.label2.tabindex = 6;
this.label2.text = "目录:";
//
// button1
//
this.button1.location = new system.drawing.point(8, 168);
this.button1.name = "button1";
this.button1.tabindex = 7;
this.button1.text = "button1";
this.button1.click += new system.eventhandler(this.button1_click);
//
// form1
//
this.autoscalebasesize = new system.drawing.size(6, 14);
this.clientsize = new system.drawing.size(280, 197);
this.controls.add(this.button1);
this.controls.add(this.label2);
this.controls.add(this.label1);
this.controls.add(this.setacl);
this.controls.add(this.textbox2);
this.controls.add(this.textbox1);
this.maximizebox = false;
this.minimizebox = false;
this.name = "form1";
this.text = "form1";
this.resumelayout(false);
}
#endregion
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[stathread]
static void main()
{
application.run(new form1());
}
[dllimport("advapi32.dll")]
public static extern bool lookupaccountname(string lpsystemname, string lpaccountname,byte[] sid,ref int cbsid, stringbuilder referenceddomainname, ref int cbreferenceddomainname,ref int peuse);
system.management.managementobjectsearcher diskclass=new managementobjectsearcher("select filesystem from win32_logicaldisk where name='"+diskname+":'");