简体   繁体   English

如何在安装后在Visual Studio 2010中创建安装包,它在启动时自动运行?

[英]How do I create a installation package in visual studio 2010 after installed it is automatically run when boot?

I have .net windows application project, I can able to create installation package and installation has been done successfully. 我有.net windows应用程序项目,我能够创建安装包并且安装已成功完成。 After installed my project, it has been run successfully when i click manually. 安装完我的项目后,我手动点击它已成功运行。 I need to run my project automatically when my system boot. 我需要在系统启动时自动运行我的项目。

How to create installer after install my project,it has to run automatically whenever my system boot. 如何在安装我的项目后创建安装程序,它必须在我的系统启动时自动运行。 Teach me how to done this work. 教我如何完成这项工作。

You can either add an registry key to HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run which contains the path to your executable, or you can add a shortcut in the directory Startup in the user's start menu. 您可以添加注册表项以HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run包含你可执行文件的路径,也可以在目录中添加一个快捷方式Startup用户的开始菜单。 I'd recommend the registry key, as the user won't see more of your program's shortcuts but the functionality is thesame. 我建议使用注册表项,因为用户不会看到更多程序的快捷方式,但功能相同。

Another way to approach this is to let the user decide what to do. 解决这个问题的另一种方法是让用户决定做什么。 You could create some sort of configuration screen, which lets the user decide if your software should run at boot. 您可以创建某种配置屏幕,让用户决定您的软件是否应该在启动时运行。 Essentially, you could do thesame thing I described above, but handle it in your code rather than in your installer. 基本上,你可以做我上面描述的同样的事情,但是在你的代码而不是你的安装程序中处理它。 Depending on what software you built, this way you don't push the user to have your software started at boot. 根据您构建的软件,这种方式不会促使用户在启动时启动软件。

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

相关问题 在Visual Studio 2010中调试停止后自动运行批处理文件吗? - Automatically Run Batch File After Debugging Stops in Visual Studio 2010? 重新安装Visual Studio 2010后,缩进已更改 - Indenting changed after I re-installed Visual Studio 2010 在Visual Studio 2010中进行调试时如何设置IIS? - How do I setup IIS when debugging in Visual Studio 2010? 异步CTP损坏的安装后如何修复Visual Studio 2010 - How to repair Visual Studio 2010 after broken installation of Async CTP 如何将Microsoft Visual C ++ 2010 SP1与我的Visual Studio安装程序项目一起打包 - How do I package Microsoft Visual C++ 2010 SP1 with my Visual Studio installer project 如何在Visual Studio中运行作为NuGet软件包安装的wkhtmltopdf(.exe) - How run wkhtmltopdf(.exe) installed as NuGet package in Visual Studio 在Visual Studio 2010中创建安装程序包 - Create setup package in Visual studio 2010 使用Visual Studio 2010创建“最小部署程序包” - Create a “minimum deployment package” with Visual Studio 2010 如何创建有效的安装包? - How do I create a valid installation package? 如何在未安装 Nuget 或 Visual Studio 的 Web 服务器上安装、更新、注册 Nuget package? - How do I Install, Update, Register a Nuget package on the Web Server that does not have Nuget or Visual Studio installed?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM