Solved

MSP and File Removal

Posted on 2013-05-09
5
433 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 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
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.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

690 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