Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/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 2015 在安装驱动程序时防止WIX安装程序创建安装文件夹_Visual Studio 2015_Wix_Installation_Driver - Fatal编程技术网

Visual studio 2015 在安装驱动程序时防止WIX安装程序创建安装文件夹

Visual studio 2015 在安装驱动程序时防止WIX安装程序创建安装文件夹,visual-studio-2015,wix,installation,driver,Visual Studio 2015,Wix,Installation,Driver,我在visualstudio中使用wix3.10和DIFx安装UMDF驱动程序。我的驱动程序安装成功。困扰我的是WIX需要TARGETDIR目录。我的文件将被复制到此目录 安装后,我不需要这些文件留在那里。如何将WIX配置为不创建这样的文件夹,而只运行DIFx并安装驱动程序 如果这是不可能的,我如何至少告诉WIX在安装后删除TARGETDIR目录 这是我的wxs文件的内容: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="h

我在
visualstudio
中使用
wix3.10
DIFx
安装
UMDF
驱动程序。我的驱动程序安装成功。困扰我的是
WIX
需要
TARGETDIR
目录。我的文件将被复制到此目录

安装后,我不需要这些文件留在那里。如何将
WIX
配置为不创建这样的文件夹,而只运行
DIFx
并安装驱动程序

如果这是不可能的,我如何至少告诉
WIX
在安装后删除
TARGETDIR
目录

这是我的
wxs
文件的内容:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:difx="http://schemas.microsoft.com/wix/DifxAppExtension">
    <Product Id="B50DE2AF-BCA4-4B82-B859-F3A3C380985D" Name="MyDriver_Installer" Language="1033" Version="1.0.0.0" Manufacturer="MeInc" UpgradeCode="73E6F899-CB1E-4BA6-B282-73ADCF69FB03">
        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

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

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

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

    <Fragment>
        <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
            <Component Id="MyDriver.dll">
                <File Id="MyDriver.dll" Source="..\x64\Debug\MyDriver Package\MyDriver.dll" KeyPath="yes" />
                <difx:Driver AddRemovePrograms="yes" Legacy="yes" PlugAndPlayPrompt="no" DeleteFiles="yes" />
            </Component>
            <Component Id="MyDriver.inf">
              <File Id="MyDriver.inf" Source="..\x64\Debug\MyDriver Package\MyDriver.inf" KeyPath="yes" />
            </Component>
            <Component Id="mydriver.cat">
              <File Id="mydriver.cat" Source="..\x64\Debug\MyDriver Package\mydriver.cat" KeyPath="yes" />
            </Component>
            <Component Id="WudfUpdate_01011.dll">
              <File Id="WudfUpdate_01011.dll" Source="..\x64\Debug\MyDriver Package\WudfUpdate_01011.dll" KeyPath="yes" />
            </Component>
            <Component Id="WdfCoInstaller01011.dll">
              <File Id="WdfCoInstaller01011.dll" Source="..\x64\Debug\MyDriver Package\WdfCoInstaller01011.dll" KeyPath="yes" />
            </Component>
            <Component Id="winusbcoinstaller2.dll">
              <File Id="winusbcoinstaller2.dll" Source="..\x64\Debug\MyDriver Package\winusbcoinstaller2.dll" KeyPath="yes" />
            </Component>
        </ComponentGroup>
    </Fragment>
</Wix>


您是否想过添加一个简单的QTEXECA来删除文件?您是否想过添加一个简单的QTEXECA来删除文件?