?
Solved

MSP and File Removal

Posted on 2013-05-09
5
Medium Priority
?
434 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on 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.
Suggested Courses

741 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