installutil.exe [英] installutil.exe

查看:81
本文介绍了installutil.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



有谁知道怎样才能运行installutil.exe?



我正试图从cmd运行它并且它失败。



'installutin不被认为是内部或外部命令'

或这样的事情。



希望有人可以帮我解决这个问题。



谢谢。

Hi every body,

Does anybody know how can I run installutil.exe?

I'm trying to run it from cmd and it fails.

'installutin does not recognized as an intenal or external command'
or something like this.

Hope someone can help me with that issue.

Thanks.

推荐答案

它位于C:\ WindowsD.Microsoft.NET \ Framework \v2.0.50727(至少在我的机器上)。

有关程序的信息: http://msdn.microsoft.com/en-us /library/50614e95(VS.71).aspx [ ^ ]



干杯
It's located in C:\Windows\Microsoft.NET\Framework\v2.0.50727 (at least on my machine).
Information about the progam : http://msdn.microsoft.com/en-us/library/50614e95(VS.71).aspx[^]

Cheers


'installutin无法识别作为一个内部或外部命令'



Y.你需要导航到installutil.exe所在的路径。

默认情况下它是:

'installutin does not recognized as an intenal or external command'

You need to navigate to the path where installutil.exe is present.
By default it is:
C:\ WINDOWS \ MicrosoftMosrosoft.NET \ Framework\v2.0.50727
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727





考虑到,C盘是你的系统驱动器。



所以在使用命令之前键入 cd C:\ WINDOWS \ Macrooft.NET\Framework\v2.0.50727



如果你还有问题,谷歌为installutil.exe



希望它有所帮助! :thumbsup:



considering, C drive is your system drive.

So type cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 before you use the command.

If you still have issues, Google for "installutil.exe"

Hope it helps! :thumbsup:


这有点偏离主题,但我已经停止使用InstallUtil来安装我的服务。将它添加到服务本身真的很容易。添加对System.Configuration.Install的引用(如果我没记错的话,在Client Profile版本中不可用),然后像这样在Program.cs中更新Main() - 函数。



static void Main(string [] args)

{

if(Environment.UserInteractive)

{

string parameter = string.Concat(args);

switch(参数)

{

case" - install":

ManagedInstallerClass.InstallHelper(new [] {Assembly.GetExecutingAssembly()。Location});

break;

case" - uninstall" ;:

ManagedInstallerClass.InstallHelper(new [] {" / u",Assembly.GetExecutingAssembly()。Location});

break;

}

}

其他

{

ServiceBase [] servicesToRun = new ServiceBase []

{

新服务1()

};

ServiceBase.Run(servicesToRun);

}

}
This is a tiny bit off-topic but I've stopped using InstallUtil to install my services. It's is really easy to just add it to the service itself. Add a reference to System.Configuration.Install (not available in the Client Profile editions if I remember right) and then update your Main()-function in Program.cs like this.

static void Main(string[] args)
{
if (Environment.UserInteractive)
{
string parameter = string.Concat(args);
switch (parameter)
{
case "--install":
ManagedInstallerClass.InstallHelper(new[] { Assembly.GetExecutingAssembly().Location });
break;
case "--uninstall":
ManagedInstallerClass.InstallHelper(new[] { "/u", Assembly.GetExecutingAssembly().Location });
break;
}
}
else
{
ServiceBase[] servicesToRun = new ServiceBase[]
{
new Service1()
};
ServiceBase.Run(servicesToRun);
}
}


这篇关于installutil.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆