摘要: var security = new DirectorySecurity(); string path=@"C:\temp"//设置权限的应用为文件夹本身、子文件夹及文件,所以需要InheritanceFlags.ContainerInherit 或 InheritanceFlags.ObjectInherit security.AddAccessRule(new FileSystemAccessRule("NETWORK SERVICE", FileSystemRights.FullControl, InheritanceFlags.Container 阅读全文
posted @ 2014-03-18 12:52 清山博客 阅读(572) 评论(0) 推荐(0)
摘要: var security = new DirectorySecurity(); string path=@"C:\temp"//设置权限的应用为文件夹本身、子文件夹及文件,所以需要InheritanceFlags.ContainerInherit 或 InheritanceF... 阅读全文
posted @ 2014-03-18 12:52 清山博客 阅读(334) 评论(0) 推荐(0)
摘要: 方法一:对于C#来说,调用WMI是一种简单易行的方式。我们可以用Win32_Processor类里面的AddressWidth属性来表示系统的位宽。AddressWidth的值受CPU和操作系统的双重影响。具体的值如下面的表格所示:32bit OS64bit OS32bit CPUAddressWidth = 32N/A64bit CPUAddressWidth = 32AddressWidth = 64可以用下面的C#代码得到AddressWidth的值(注意需添加引用System.Management)public static string Detect3264(){ ... 阅读全文
posted @ 2014-03-18 11:09 清山博客 阅读(1329) 评论(0) 推荐(0)
摘要: 方法一:对于C#来说,调用WMI是一种简单易行的方式。我们可以用Win32_Processor类里面的AddressWidth属性来表示系统的位宽。AddressWidth的值受CPU和操作系统的双重影响。具体的值如下面的表格所示:32bit OS64bit OS32bit ... 阅读全文
posted @ 2014-03-18 11:09 清山博客 阅读(355) 评论(0) 推荐(0)