Example #1
0
        /// <summary>
        /// Deletes %temp%\RegistrationId (i.e. %temp%\{00000000-0000-0000-4F85-B939234AE44F}) and all of it's contents.
        /// This will be done for all users temp folders on the machine cause another user may have installed this layout
        /// </summary>
        public void DeleteBundleExtractionTempCache()
        {
            if (!String.IsNullOrEmpty(this.RegistrationId))
            {
                string cacheFolder;

                // delete the cache for all users if it exists
                foreach (string directory in UserUtilities.GetAllUserTempPaths())
                {
                    cacheFolder = Path.Combine(directory, this.RegistrationId);
                    WixTest.Burn.LayoutManager.LayoutManager.RemoveDirectory(cacheFolder);
                }
            }
        }
Example #2
0
        /// <summary>
        /// Deletes %temp%\PackageName_PackageVersion (i.e. %temp%\BurnTestSKU_v0.1) and all of it's contents.
        /// This will be done for all users temp folders on the machine cause another user may have installed this layout
        /// </summary>
        public void DeleteEngineDownloadCache()
        {
            string cacheFolder;

            // delete the cache for current user (local admin)
            cacheFolder = m_Layout.GetDownloadCachePath();
            WixTest.Burn.LayoutManager.LayoutManager.RemoveDirectory(cacheFolder);

            // delete the cache for all other users if it exists
            foreach (string directory in UserUtilities.GetAllUserTempPaths())
            {
                cacheFolder = Path.Combine(directory, m_Layout.GetDownloadCacheFolderName());
                WixTest.Burn.LayoutManager.LayoutManager.RemoveDirectory(cacheFolder);
            }
        }