使用c#在任何机器上安装iis [英] installing iis on any machine using c#
本文介绍了使用c#在任何机器上安装iis的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只需要以编程方式在任何机器上安装iis。
所以有人可以帮我解决如何安装它使用c#。
请为我提供任何参考。
谢谢
Chitresh
Hi,
I just need to install iis on any machine programatically.
So could anyone please help me how to install it using c#.
please provide me any reference for this.
Thanks
Chitresh
推荐答案
文件sysocmgr.exe位于文件夹C:\ Windows \ System32。 sysocmgr.exe是Windows系统文件。 sysocmgr.exe是一个微软签名的文件。
所以在c#中编写控制台程序只是打开visual studio并点击新的控制台应用程序template.once选择你会在下面找到类型的proram
{
public static void Main(string [] args)
{
System.Diagnostics.Process Proc = new System.Diagnostics.Process();
Proc.StartInfo.FileName =sysocmgr.exe;
Proc .Start();
}
}
一旦你运行这个程序就会要求iis用于安装的服务器CD
File sysocmgr.exe is located in the folder C:\Windows\System32. sysocmgr.exe is a Windows system file. sysocmgr.exe is a Microsoft signed file.
So writing console program in c# is just open visual studio and click on new console application template.once opned you will find below type of proram
{
public static void Main(string[] args)
{
System.Diagnostics.Process Proc = new System.Diagnostics.Process();
Proc.StartInfo.FileName = "sysocmgr.exe";
Proc.Start();
}
}
once you will run this program it will ask for iis server CD for installation
使用实用程序DISM。
请参阅以下链接:
< a href =https://msdn.microsoft.com/en-us/library/windows/desktop/dd371719(v=vs.85).aspx>部署图像服务和管理(DISM)(Windows) [ ^ ]
Windows Vista软件包 [ ^ ]
Use the utility DISM.
Refer to links below:
Deployment Image Servicing and Management (DISM) (Windows)[^]
Windows Vista Packages[^]
这篇关于使用c#在任何机器上安装iis的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文