Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Melt.exe crashes when melting an MSI and running with elevated privileges #5859
In Microsoft.Tools.WindowsInstallerXml.Pdb.Load(Stream stream, Uri uri, bool suppressVersionCheck, bool suppressSchema), an instance of TempFileCollection is created to generate a name of
KB4338420 changed the behaviour of TempFileCollection. Before KB4338420 was installed, TempFileCollection::AddExtension would return a file path in the %TMP% directory (i.e. C:\Temp\zwlyt205.cab). After KB4338420 is installed, it would create random subdirectory in %TMP% and return a file path in this directory (i.e. C:\DaveTemp\zwlyt205\zwlyt205.cab).
The "using" statement in Pdb.Load would cause the instance of the TempFileCollection to be disposed of which will delete the temporary folder in the %TMP% directory since the cab file has not yet been created. Later in the function another instance of TempFileCollection is created and the cab file is added to this.
A solution to this is to avoid using the "using" statement to prevent the premature garbage collection.
referenced this issue
Aug 16, 2018
What is the status of this bug? I am running into the same problem as mentioned here on our Server 2008 build machine. I did try and install 'https://support.microsoft.com/en-us/help/4345913' as mentioned above but this did not help. I see that a fix has been submitted but it looks like it has not been merged.