【问题标题】:VS installer make the application automacatically start when OS bootsVS 安装程序使应用程序在操作系统启动时自动启动
【发布时间】:2013-08-29 05:41:38
【问题描述】:

全部。

我有一个 Window 应用程序,想使用 VS2010 软件包安装程序发布它。

该软件包的一项功能要求应用程序在操作系统启动时自动启动。支持的操作系统从 Windows XP(x86/64) 到 windows 7 不等。您能否帮助启发我为上述操作系统制定通用解决方案。

非常感谢。

【问题讨论】:

    标签: installation windows-installer


    【解决方案1】:

    您最好的办法可能是在您的项目中打包一个 .bat 脚本并创建一个自定义操作来调用该文件。在其中调用sc 命令来创建你的服务:

    sc create "My Service Name" binPath= "C:\Program Files\My Folder\bin.exe" type= "own" start= "auto" DisplayName="My Service Name"
    

    this article on technet

    【讨论】:

    • 是的。需要创建一个安装后运行的执行文件。
    猜你喜欢
    • 1970-01-01
    • 2018-03-01
    • 2013-02-26
    • 1970-01-01
    • 2014-02-27
    • 2017-08-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多