Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MSP and File Removal

Posted on 2013-05-09
5
Medium Priority
?
437 Views
Last Modified: 2013-06-01
The application i am working on generates files in the appdata folder, When a package is removed i need to remove these files. I have tried the following but the msp fails to build

      <Directory Id="CommonAppDataFolder" Name="CommonAppDataFolder">
                  <Directory Id="SomeCompany" Name="SomeCompany">
                        <Directory Id="MyAppFolder" Name="ME">
                              <Component Id="MyAppFolderComponent" Guid="cc509cb7-c1a1-46cf-8c62-7cbb0017783c">
                                    <CreateFolder />
                                    <RemoveFile Id="PurgeFolder" Name="*.sdf" On="uninstall"/>
                              </Component>
                        </Directory>
                  </Directory>
            </Directory>

Then added the component to the features list. Is this possible?  If not what would be the best way to do this?
0
Comment
Question by:Rubens82
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 2000 total points
ID: 39154116
This worked:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
	<Product Id="8096b8b2-08d2-42bc-95fc-c318ef580dad" Name="WixProject1" Language="1033" Version="1.0.0.0" Manufacturer="WixProject1" UpgradeCode="c69223cc-af68-49bf-b64d-31d7e6d75155">
		<Package InstallerVersion="200" Compressed="yes" />
		<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
		<Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="CommonAppDataFolder" Name="CommonAppDataFolder">
        <Directory Id="SomeCompany" Name="SomeCompany">
          <Directory Id="MyAppFolder" Name="ME">
            <Component Id="MyAppFolderComponent" Guid="cc509cb7-c1a1-46cf-8c62-7cbb0017783c">
              <CreateFolder />
              <RemoveFile Id="PurgeFolder" Name="*.sdf" On="uninstall"/>
            </Component>
          </Directory>
        </Directory>
      </Directory>      
		</Directory>

		<Feature Id="ProductFeature" Title="WixProject1" Level="1">
			<ComponentRef Id="MyAppFolderComponent" />
		</Feature>

  </Product>
</Wix>

Open in new window

But this has built an msi, while you mentioned msp.
0
 
LVL 59

Expert Comment

by:LeeTutor
ID: 39212826
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 39212827
the solution I  posted was actully tested and worked as expected in Q. Accept 9212758.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question