/build/static/layout/Breadcrumb_cap_w.png

Deleting the cached msi and mst

Hi All,

Can any please gimmeVB script.I want to delete the cached copy of msi and mst from c:\Windows\Installer.
Product code of the application is {18D6DCEF-5BB6-4994-BC38-C34534137245}.

Thanks in advance.

0 Comments   [ + ] Show comments

Answers (2)

Posted by: jmcfadyen 15 years ago
5th Degree Black Belt
0
why would want to do that.

the only suggestion i have to remove that is remove the application.

if you dont want to remove the entire application then dont remove the cached copy either .
Posted by: AngelD 15 years ago
Red Belt
0
I don't know why you would want this but here is a vbscript to fetch the cached location, you have to add the deletion code your-self.

Option Explicit
On Error Resume Next

Const ProductCode = "{18D6DCEF-5BB6-4994-BC38-C34534137245}"

Dim Installer : Set Installer = Nothing
Set Installer = CreateObject("WindowsInstaller.Installer")

If Not IsProductInstalled(ProductCode) Then Wscript.Quit

Dim InstallSource : InstallSource = Installer.ProductInfo(ProductCode, "LocalPackage")
Dim Transforms : Transforms = Installer.ProductInfo(ProductCode, "Transforms")

WScript.Echo "Cached package: " & InstallSource
WScript.Echo "Cached Transforms: " & Transforms

Set Installer = Nothing
Wscript.Quit(0)

'// check if designated product is installed
Function IsProductInstalled(ProductCode)
IsProductInstalled = False

Dim ProductState : ProductState = Installer.ProductState(ProductCode)
If ProductState <> 5 Then
Wscript.Echo "Product not installed (ProductState return: " & ProductState & ")"
Wscript.Echo "Please check the ProductCode"

Exit Function
End If

IsProductInstalled = True
End Function
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ