简体   繁体   English

安装项目msi builds +声称安装成功,但没有输出

[英]Setup Project msi builds+ claims successful install, but no output

As per the title, I create a msi installer and then run it and it claims to have successfully installed and if I look in the control panel to add/remove program it appears there. 按照标题,我创建了一个msi安装程序,然后运行它并声称已成功安装,如果我查看控制面板中的添加/删除程序,它将显示在该位置。 However, when I look in the directory I specified, there is no change made to it. 但是,当我查看指定的目录时,没有对其进行任何更改。 Nothing is copied into it. 没有任何内容被复制到其中。

When I run the installer and click the button to create a new directory and choose that new directory to install into, I get no errors. 当我运行安装程序并单击按钮创建一个新目录并选择要安装到的新目录时,我没有收到任何错误。 It all runs fine, but after exiting the installer, this new directory is not created. 一切运行正常,但是退出安装程序后,不会创建此新目录。

I follow these steps to create my msi installer: 我按照以下步骤创建我的msi安装程序:

  1. Open Visual Studio and open the project I wish to create installer for 打开Visual Studio并打开我要为其创建安装程序的项目

  2. File-> Add -> New Project -> Setup Wizard 文件->添加->新项目->设置向导

  3. Select "Create a setup for Windows Application" 选择“为Windows应用程序创建安装程序”

  4. Select "Primary output from (project)" 选择“(项目)的主要输出”

  5. Add additional file -> path to txt file 添加其他文件-> txt文件的路径

  6. Finish setup wizard 完成安装向导

  7. Look at Application Folder for setup 查看应用程序文件夹进行设置

  8. Right click primary output from (project) 右键单击(项目)的主要输出

  9. Click outputs and verify it is correct 单击输出并确认它正确

  10. Build the setup project 建立安装项目

This outputs the .msi file along with the .exe file. 这将输出.msi文件以及.exe文件。 There is no problems/errors running either of these. 运行任何一个都没有问题/错误。 It just doesn't install/copy the files. 它只是不安装/复制文件。

Ok, so it was a privileges issue when double clicking the .msi file. 好的,因此双击.msi文件是一个特权问题。

It would run fine and claim to install successfully but it didn't create folders/copy stuff in etc. It needed admin privileges to install. 它可以正常运行并声称可以成功安装,但是它不会在其中创建文件夹/复制内容。它需要管理员权限才能安装。

So, to give it the privileges I edited the .vdproj file that created the .msi file (edited in notepad). 因此,为了给它特权,我编辑了创建.msi文件的.vdproj文件(在记事本中编辑)。 I went to the MsiBootstrapper section and changed "RequiresElevation" = "11:FALSE" to "RequiresElevation" = "11:TRUE". 我转到MsiBootstrapper部分,将“ RequiresElevation” =“ 11:FALSE”更改为“ RequiresElevation” =“ 11:TRUE”。

More information can be found here: http://msdn.microsoft.com/en-us/library/2kt85ked.aspx 可以在这里找到更多信息:http://msdn.microsoft.com/zh-cn/library/2kt85ked.aspx

I'm still not completely happy with this, it requires double clicking the .exe file which gives the UAC prompt to get the .msi file to run with the required privileges. 我对此仍然不完全满意,它需要双击.exe文件,该文件会给UAC提示以使.msi文件以所需的特权运行。 It seems very easy for a user to just double click the .msi file and believe things to have installed... 对于用户来说,只需双击.msi文件并相信已安装的东西就非常容易...

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

相关问题 如何使用VS安装和部署项目并构建一个.msi文件来安装程序? - how to use VS Setup and Deployment project and build an .msi file to install the program? 如何使用VS 2010在Setup Project的.msi输出文件中添加必备安装? - How to add prerequisite installation in the .msi output file of Setup Project using VS 2010? 删除现有版本并安装msi安装程序 - Remove existing version and install msi setup 成功安装后,使VDProj .MSI安装程序在本地复制自身 - Make VDProj .MSI installer copy itself locally after successful install 如何安装从维克斯自定义引导程序/卸载单MSI软件包包含多个类似的MSI安装项目的添加/删除功能? - How to install / uninstall single msi from wix custom bootstrapper bundle containing multiple MSIs like add/remove feature of Setup project? 安装后多个Project MSI安装程序未运行 - Multiple Project MSI Installer not running after install Windows服务无法通过MSI安装程序在几台计算机上安装 - Windows service fails to install through msi setup in few machines 在安装程序项目中的安装之前添加安装MSI的自定义操作 - Add custom action of installing msi before the setup in installer project VS2008安装项目:卸载以前的MSI - VS2008 Setup Project: Uninstalling the previous MSI C# - 获取安装项目 msi/exe 文件的版本 - C# - Get version of Setup project msi/exe file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM