brian
Posts: 39
Joined: Tue Nov 29, 2005 5:30 pm
Location: California, USA

New Windows 8 Requirement to Delete all Files on Uninstall

Mon Nov 05, 2012 2:03 am

There's been a change in the logo compliance requirements from Windows 7 to Windows 8. Windows 7 used to let you leave some files around but Windows 8 doesn't. This is a big problem for us because we leave connection string xml files as permanent during an upgrade (which is essentially and uninstall and reinstall). Because of this new requirement for Windows 8, our app now fails Windows 8 ACK (App Certification Kit) testing.

The details are here, first line in the requirements list for Desktop App:
http://msdn.microsoft.com/en-us/library ... s.85).aspx

What I need to know is if it's possible to leave a file during upgrade, but have it removed during uninstall? I looked in the component properties for our Xml file and don't see anything. Without this ability we cannot get certified.

Thanks,
Brian

mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: New Windows 8 Requirement to Delete all Files on Uninsta

Mon Nov 05, 2012 10:28 am

Hi Brian,
What I need to know is if it's possible to leave a file during upgrade, but have it removed during uninstall?
You can use the file's context menu -> Properties -> Operations tab and set a condition for the .XML. Something like:

Code: Select all

REMOVE="ALL" AND (NOT UPGRADINGPRODUCTCODE)
All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

brian
Posts: 39
Joined: Tue Nov 29, 2005 5:30 pm
Location: California, USA

Re: New Windows 8 Requirement to Delete all Files on Uninsta

Mon Nov 05, 2012 5:26 pm

Thanks Mihai. Not sure I'm following this one though, the Operations tab only displays "Overwrite Behavior". I'm not wanting to overwrite the file, I'm wanting to uninstall it during uninstall, but leave it during an upgrade.

Brian

mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: New Windows 8 Requirement to Delete all Files on Uninsta

Tue Nov 06, 2012 4:42 pm

Hi Brian,

That option helps you preserve the file content according to the condition. You can find more related information in the How do I prevent a file or registry entry from being uninstalled or repaired? user guide article.

Let us know how it turns out.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

brian
Posts: 39
Joined: Tue Nov 29, 2005 5:30 pm
Location: California, USA

Re: New Windows 8 Requirement to Delete all Files on Uninsta

Tue Nov 06, 2012 5:27 pm

I'm not wanting to preserve the file, I want to delete it. Can you read my original post again?

mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: New Windows 8 Requirement to Delete all Files on Uninsta

Wed Nov 07, 2012 11:07 am

Hi Brian,
What I need to know is if it's possible to leave a file during upgrade, but have it removed during uninstall?
So you need to preserve the file during upgrade but remove it during a regular uninstall. I posted my first reply with the exact opposite condition, sorry about that.

Let me clarify :arrow:
  • If you set the following condition for a file in its Operations Tab it will be preserved during uninstall but not during upgrade:

    Code: Select all

    REMOVE="ALL" AND (NOT UPGRADINGPRODUCTCODE)
  • If you set the following condition in the same tab, it will be deleted during uninstall but preserved during upgrade:

    Code: Select all

    UPGRADINGPRODUCTCODE
The UPGRADINGPRODUCTCODE property is set in the MSI which is being upgraded if the package is uninstalled by a newer version.

Let us know if you have any questions.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”