[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

MSP and File Removal

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
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.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
Suggested Courses
Course of the Month19 days, 12 hours left to enroll

872 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