Solved

MSP and File Removal

Posted on 2013-05-09
5
421 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
  • 2
5 Comments
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
the solution I  posted was actully tested and worked as expected in Q. Accept 9212758.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Image capture and Deploy method is consist on two phases. In our first phase we capture the image of windows from the PC in which Windows and others softwares are already installed. In second phase we deploy the created image on new PC in which we…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now