0

我有一个要求,我有一个在开发人员环境中开发的 Windows 服务。我必须将我的服务安装到我没有安装 .Net Framework 的 Windows Server 2008 上。基于这种情况,我选择了另一个将安装 Windows 服务的 EXE 文件。

我有一些正常的命令提示符可以使用此命令安装 Windows 服务。

c:\> sc create binpath = "my service path [EXE]"

但我需要在另一个 EXE 文件中执行此语句。在这种情况下有没有更好的解决方案。请帮助我。

谢谢,

4

1 回答 1

0
if (the service is developed with .NET) {
    //do nothing and tell you manager that 
    //.net framework needs to be installed on Windows Server 2008
} else {
    //use the sc command or 
    //put the command in a batch file with conent "sc create binpath = "my service path [EXE]"
}
于 2012-11-23T04:45:03.427 回答