简体   繁体   English

如何在Windows服务中查看Windows窗体应用程序作为服务运行的应用程序

[英]How to View the Windows form application In Windows Service Application running as service

I have a Windows Service Application which contains one Service.cs and one Windows Form Application.Now as per my requirement i have to make a setup installer of this application which i did using Visual Studio Setup project under Deployment Section. 我有一个Windows Service Application,其中包含一个Service.cs和一个Windows Form Application.Now,根据我的要求,我必须为此应用程序安装安装程序,该程序是我在“部署”部分下使用Visual Studio安装程序项目完成的。

Now if i will install my setup Windows Service file will be added as Service and we can see it and its working fine also but i am not seeing the windows form application. 现在,如果我将安装我的安装程序,则Windows服务文件将作为服务添加,并且我们也可以看到它并且工作正常,但是我没有看到Windows窗体应用程序。

In the control panel add/remove program my application has been added as i am seeing it but windows form application is not showing in All programs of start button. 在控制面板的“添加/删除程序”中,我已经看到了我的应用程序,但是Windows窗体应用程序未显示在“开始”按钮的所有程序中。

Please help me . 请帮我 。 Thanks in advance. 提前致谢。

If this is urgent: 如果这很紧急:

In the File System Editor for the setup project, it should show the target machine's file system. 在安装项目的文件系统编辑器中,它应显示目标计算机的文件系统。 By default, the primary outputs you've specified will be set to install to the "Application Folder". 默认情况下,您指定的主要输出将设置为安装到“应用程序文件夹”。 But what you want to do is to look under the "User's Programs Menu" (I can't remember if this shows up by default - if not, right click "File System on Target Machine", "Add Special Folder" and select this folder). 但是,您要做的是在“用户程序菜单”下查看(我不记得默认情况下是否显示此菜单-如果没有,请右键单击“目标计算机上的文件系统”,“添加特殊文件夹”,然后选择此菜单夹)。

Then, in the right-hand pane, right click and choose "Create New Shortcut", navigate down through "Application Folder", select the windows forms application and hit OK. 然后,在右侧窗格中,右键单击并选择“创建新快捷方式”,向下浏览“应用程序文件夹”,选择Windows窗体应用程序,然后单击“确定”。 Then give it a suitable name. 然后给它起一个合适的名字。

If this isn't urgent - go and find a better setup tool and learn how to do similar things to the above using that tool. 如果不是很紧急 ,请去寻找一个更好的设置工具,并学习如何使用该工具执行与上述类似的操作。 Visual Studio 2010 was the last version to include the Setup project support, so spending time learning this tool now is wasted time. Visual Studio 2010是最后一个包含安装项目支持的版本,因此现在花时间学习此工具是浪费时间。 Better to find a tool that will continue to work as you upgrade VS versions. 最好找到一个可以在升级VS版本时继续使用的工具。 I'd normally suggest WiX since it comes at a great price (free) but it does have a learning curve (since you author the setup in XML). 我通常会建议使用WiX,因为它的价格很高(免费),但确实有一个学习曲线(因为您使用XML编写了设置)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM