You are welcome and have a good day Lukas.
How to run MicrosoftProgram_Install_and_Uninstall.meta.diagcab - unattended
Hi!
I have a task to make a program that gets all programs and filters them based on a keyword. then uninstall them. This I have been able to do.
The commands I used originally:
wmic product get name, identifyingnumbermsiExe.exe /x {identifyingnumber} /qb
This works but not with the program I'm tasked to uninstall.
Fault code:
There is a problem with this Windows Installer package. a program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.
To uninstall them I need to use MicrosoftProgram_Install_and_Uninstall.meta.diagcab. I have tried:
- Searching on the web. Many posts, but they end without an answer
- unzip the diagcab file. then use
***Get-TroubleshootingPack -Path "C:\path\to\unziped\MicrosoftProgram_Install_and_Uninstall.meta" -Answerfile "C:\path\to\answerfile.xml"***Then use the answerfile:
Get-TroubleshootingPack -Path "C:\path\to\unziped\MicrosoftProgram_Install_and_Uninstall.meta" | Invoke-TroubleShootingPack -AnswerFile "C:\path\to\answerfile.xml"
but I get only this response:
Checking the registry for Patch related problems -1 No problems were detected
- msdt.exe -quiet -diagcab "C:\Path\To\MicrosoftProgram_Install_and_Uninstall.meta.diagcab" /af "C:\Path\To\Your\AnswerFile.xml" output:
Errorcode: 0x80070057 - Get-Package -Name "NI-DIM 21.0.0" | Uninstall-Package
Uninstall-Package: Uninstallation operation failed. Please look at 'C:\Users\Lukas\AppData\Local\Temp\a507daf4-2c54-47b6-b4cf-1756331e3af0\msi.log' file for details.
At line:1 char:37
+ Get-Package -Name "NI-DIM 21.0.0" | Uninstall-Package
+ ~~~~~~~~~~~~~~~~~
**+ CategoryInfo : InvalidOperation: ({34B1C8E6-2BBF-4CCB-8EEB-6471449D424B}:String) [Uninstall-Package], Exception**
**+ FullyQualifiedErrorId: Uninstallation operation failed. Please look at '{0}' file for details., Microsoft.PowerShell.PackageManagement.Cmdlets.UninstallPackage**
MSI.log:
Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action nidim_OCM_remove.NIDIM, location: C:\WINDOWS\Installer\MSIF6F3.tmp, command: /file "C:\Program Files (x86)\National Instruments\Shared\niorb\nidimr.ocm"
ect data
Answerfile:
| <?xml version="1.0" encoding="UTF-8"?> <br><br><Answers Version="1.0"> <br><br> <Interaction ID="IID_Install_Uninstall"> <br><br> <Value>Uninstall</Value> <br><br> </Interaction> <br><br> <Interaction ID="ID_DidRPRWork"> <br><br> <Value>NO</Value> <br><br> </Interaction> <br><br> <Interaction ID="IID_ProductRemoval"> <br><br> <Value>AppsAnywhere</Value> <br><br> </Interaction> <br><br> <Interaction ID="IID_ManualProductRemoval"> <br><br> <Value>{18EF2EE1-5562-43DE-8E7B-BD0BA6E8FC89}</Value> <br><br> </Interaction> <br><br></Answers> |
|---|
The reason I need to do it unattended and as a script is that there are a lot of machines here that need of removed.
Windows for home | Windows 10 | Installasjon og oppgradering
Låst spørsmål. Dette spørsmålet ble overført fra Microsofts kundestøttefelleskap. Du kan stemme på om det er nyttig, men du kan ikke legge til kommentarer eller svar eller følge spørsmålet.
3 svar
Sorter etter: Mest nyttig
-
Anonym
2024-01-25T08:09:04+00:00 Good day Lukas! I would suggest to post this query to our neighbor forum from the link below as this is best suited in there. They are more oriented on with regards to this type queries/issues and there will be IT Pros and Gurus/System Admins/IT Admins and the likes who has the same deployment or setup in this type of environment and are available that will be able to fulfill your query out there.
https://learn.microsoft.com/en-us/answers/quest...
Regards,
Paul R.Thanks, was wondering where to post it. Will do that!
-
paulr0511 44,705 Omdømmepoeng Uavhengig rådgiver
2024-01-24T14:41:24+00:00 Good day Lukas! I would suggest to post this query to our neighbor forum from the link below as this is best suited in there. They are more oriented on with regards to this type queries/issues and there will be IT Pros and Gurus/System Admins/IT Admins and the likes who has the same deployment or setup in this type of environment and are available that will be able to fulfill your query out there.
https://learn.microsoft.com/en-us/answers/quest...
Regards,
Paul R.