我使用eclipse Indigo.我从市场安装(帮助 - > MarketPlace ...)Maven Integration for Eclipse.一切都很好,但是pom编辑器只有几个选项卡(Overview,Depedencies,Depedency Hierarchy,Effective POM,pom.xml).
我去了Window-> Preferences-> Maven,但没有任何POM Editor偏好.(原型,发现,安装,模板,用户界面,用户设置)
有任何想法吗?
在我的应用程序中,我想看看Windows 7是否被激活.要清楚,我不想检查窗户是否是正品.我使用下面的代码,在这里找到http://www.dreamincode.net/forums/topic/166690-wmi-softwarelicensingproduct/
执行查询所需的时间约为5-10秒.反正有没有减少所需的时间?或者另一种检查winows 7是否被激活的方法?
public string VistaOrNewerStatus(){
string status = string.Empty;
string computer = ".";
try
{
//set the scope of this search
ManagementScope scope = new ManagementScope(@"\\" + computer + @"\root\cimv2");
//connect to the machine
scope.Connect();
//use a SelectQuery to tell what we're searching in
SelectQuery searchQuery = new SelectQuery("SELECT * FROM SoftwareLicensingProduct");
//set the search up
ManagementObjectSearcher searcherObj = new ManagementObjectSearcher(scope, searchQuery);
//get the results into a collection
using (ManagementObjectCollection obj = searcherObj.Get())
{
MessageBox.Show(obj.Count.ToString());
//now loop …
Run Code Online (Sandbox Code Playgroud) 我正在尝试从我的应用程序运行一个进程(C#,仅用于Win7),但在许多PC上,进程立即启动和关闭(如任务管理器中所示),而在其他PC上则启动正常.这是我使用的代码:
ProcessStartInfo startInfo = new ProcessStartInfo(@"c:\windows\system32\slui.exe");
startInfo.UseShellExecute = false;
startInfo.Verb = "runas";
Process p = new Process();
p.StartInfo = startInfo;
p.Start();
p.WaitForExit();
Run Code Online (Sandbox Code Playgroud)
我错过了什么吗?