Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 2012 使用C#VS2012为桌面应用程序创建WiX设置_Visual Studio 2012_Wix_Installation - Fatal编程技术网

Visual studio 2012 使用C#VS2012为桌面应用程序创建WiX设置

Visual studio 2012 使用C#VS2012为桌面应用程序创建WiX设置,visual-studio-2012,wix,installation,Visual Studio 2012,Wix,Installation,我需要创建一个安装文件,以便在大约1000台计算机中静默安装桌面应用程序(带有MS System Center)。我下载了WiX并安装在我的计算机中。在Visual Studio 2012中,我创建了一个新的安装项目,并添加了桌面应用程序作为参考 它为我创建了一个Product.wxs文件,我做了一些研究,并根据我找到的基础教程对其进行了一些修改。当我编译项目时,它为我创建了.msi文件。如果我尝试安装它,它将创建一个.exe文件并退出。当我运行exe时,什么都没有发生,表单没有打开,我得到一个

我需要创建一个安装文件,以便在大约1000台计算机中静默安装桌面应用程序(带有MS System Center)。我下载了WiX并安装在我的计算机中。在Visual Studio 2012中,我创建了一个新的安装项目,并添加了桌面应用程序作为参考

它为我创建了一个Product.wxs文件,我做了一些研究,并根据我找到的基础教程对其进行了一些修改。当我编译项目时,它为我创建了.msi文件。如果我尝试安装它,它将创建一个.exe文件并退出。当我运行exe时,什么都没有发生,表单没有打开,我得到一个兼容性警告。我的客户有Windows 7和4.5框架

另外,我在使用system center时会遇到问题吗?我看到它创建了安装所需的cab文件

这是我使用的教程:和

这是我的wxs文件:

<code class="prettyprint">
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="RMS_Setup" Language="1033" Version="1.0.0.0" Manufacturer="Familia" UpgradeCode="1234567890">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />

<Feature Id="ProductFeature" Title="RMS_Setup" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>

<Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLFOLDER" Name="RMS_Setup" />
        </Directory>
    </Directory>
</Fragment>

<Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
        <Component Id="ProductComponent">
            <File Source="$(var.KPG.ADSEF.RMS.DESKTOP.TargetPath)" />
        </Component>
    </ComponentGroup>
</Fragment>


您提供的两个链接用于两种不同的用途。第一个用于创建和MSI,第二个用于创建引导程序(一个安装多个串联在一起的MSI的程序)

关于你的问题。只要MSI在退出时没有出现错误,并且文件在那里可以使用,那么MSI就会完全按照您的指示执行。如果EXE不工作,那么这意味着该可执行文件有问题,或者有其他需要您使用MSI完成的事情

对您的问题可能有更好的答案,但在给出答案之前,您必须提供接收到的错误,并稍微调试一下可执行文件