24
2021
09
10:11:15

Installutil.exe的位置和路径



推荐点击下面图片,通过本站淘宝优惠价购买:

image.png

转自:http://www.shareb2c.com/b2c-artical-129

安装程序工具 (Installutil.exe)

安装程序工具使您得以通过在执行指定程序集中的安装程序组件来安装和卸载服务器资源。此工具与 System.Configuration.Install 命名空间中的类一起工作。
安转的位置和路径在:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe 
卸载的位置和路径在:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe
 
安装程序工具 (Installutil.exe) 安装方法和参数:
installutil [/uninstall][option [...]]assemblyname ][option [...]]assemblyname
/h[elp]
显示该工具的命令语法和选项。
/help  assemblypath
显示指定程序集中的个别安装程序所识别的任何附加选项。
/?
显示该工具的命令语法和选项。
/?  assemblypath
显示指定程序集中的个别安装程序所识别的任何附加选项。
/LogFile=[ filename]
指定在其中记录安装进度的日志文件的名称。默认文件名是 assemblyname.InstallLog。
/AssemblyName  assemblyName
[,Version= major.minor.build.revision]
[,Culture= locale]
[,PublicKeyToken= publicKeyToken]]
指定程序集的名称。必须使用程序集的版本、区域性和公钥标记完全限定程序集名称。完全限定名必须用引号括起。
例如,“myAssembly, Culture=neutral, PublicKeyToken=0038abc9deabfle5, Version=2.0.0.0”是完全限定的程序集名称。
/LogToConsole={ truefalse}
如果为  true,则将输出显示到控制台。如果为  false(默认值),则取消将输出显示到控制台。
/ShowCallStack
如果在安装过程中的任何时候出现异常,则将调用堆栈打印到日志。







1。运行--〉cmd:打开cmd命令框
2。在命令行里定位到InstallUtil.exe所在的位置
InstallUtil.exe 默认的安装位置是在C:/Windows/Microsoft.NET/Framework/v2.0.50727里面,所以你要在cmd里通过cd定位到该位置(cd C:/Windows/Microsoft.NET/Framework/v2.0.50727)
3。操作命令:
1). 安装服务命令:在命令行里输入下面的命令:
InstallUtil.exe Path/WinServiceName.exe
其中Path表示ServiceName.exe所在的位置,回车即可

2). 启动服务命令
net start ServiceName
ServiceName是真正的Service的名称(ServiceBase.ServiceName),跟.exe的名称可能一样,也可能不一样。如果不清楚,就到已安装的服务里面找到你的服务,右键属性里面看服务名称

3). 停止服务命令
net stop ServiceName

4). 卸载服务命令:在命令行里输入下面的命令:
InstallUtil.exe /u Path/WinServiceName.exe
其中Path表示ServiceName.exe所在的位置,回车即可




    /// 该服务必须在它可以执行之前安装。
    /// 服务的安装和卸载“installutil.exe”“installutil.exe / U”的服务可执行文件作为最后一个参数。
    ///  例如,“installutil.exe D:\webcamservice.exe”将安装服务的服务经理。

  •  按如下顺序“开始 - Visual Studio 2015 -VS2015 x86 本机工具命令提示符”,以管理员身份打开一个命令窗口(不要使用传统的cmd方式打开普通DOS窗口)

  • 进入创建好的服务应用目录(一般是在bin\Debug下),输入命令: installutil.exe webcamservice.exe如果安装成功,则直接显示命令提示符,没有任何信息;如果安装不成功,则会有信息出现(安装不成功下面讨论);

  • 右击“我的电脑 - 管理 - (左栏)服务和应用程序 - 服务”,可以找到服务“webcamservice”,该服务只是安装上,并没有启动,双击该服务打开属性窗口,点击启动即可

 

复制代码
1 C:\Windows\system32>installutil.exe C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.exe2 Microsoft (R) .NET Framework 安装实用工具版本 4.6.1586.03 版权所有 (C) Microsoft Corporation。保留所有权利。4 5 6 正在运行事务处理安装。7 8 正在开始安装的“安装”阶段。
复制代码

 

复制代码
 1 正在开始安装的“安装”阶段。 2 查看日志文件的内容以获得 C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.exe 程序集的进度。 3 该文件位于 C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.InstallLog。 4 正在安装程序集“C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.exe”。 5 受影响的参数是: 6    logtoconsole = 7    logfile = C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.InstallLog 8    assemblypath = C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.exe 9 正在安装服务 WebCamService...10 已成功安装服务 WebCamService。11 正在日志 Application 中创建 EventLog 源 WebCamService...12 13 “安装”阶段已成功完成,正在开始“提交”阶段。14 查看日志文件的内容以获得 C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.exe 程序集的进度。15 该文件位于 C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.InstallLog。16 正在提交程序集“C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.exe”。17 受影响的参数是:18    logtoconsole =19    logfile = C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.InstallLog20    assemblypath = C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.exe21 22 “提交”阶段已成功完成。23 24 已完成事务处理安装。25 26 C:\Windows\system32>
复制代码



本文链接:https://hqyman.cn/post/1896.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:





休息一下,本站随机推荐观看栏目:


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

您的IP地址是: