How to uninstall MicroStation and Post-Install Components silently


 Product(s):MicroStation
 Version(s):10.10.00.23
 Environment:N\A
 Area:Installation
 Subarea:General

How to uninstall MicroStation silently

Steps to Accomplish

Option 1 If you have the original install ( Setup.exe ) file

Use the -Uninstall -Quiet command line switches after the setup.exe, for example :

C:\BentleyDownloads\MicroStation\Setup_MicroStationx64.exe -Uninstall -Quiet

Option 2 If no install ( Setup.exe ) file

Use Windows PowerShell ( Start > Windows PowerShell ) to get the location of the bootstrapper Setup.exe using the following command:

gci "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "MicroStation CONNECT Edition" } | select UninstallString

This will present a path that can be used, for example :

UninstallString
---------------

"C:\ProgramData\Package Cache\{0c77a938-fe26-4e0c-8bc7-3f2064729d40}\Setup_MicroStationx64.exe"  /uninstall

This path can be used to uninstall the product silently :

Start-Process "C:\ProgramData\Package Cache\{0c77a938-fe26-4e0c-8bc7-3f2064729d40}\Setup_MicroStationx64.exe" -ArgumentList "-Uninstall -Quiet" -Wait

 

To uninstall Post-install Components such as Bentley DGN Index Service, Bentley DGN Preview Handler etc

To uninstall these components again use the Windows Powershell to obtain their msiexec / product GUID using the following command

gci "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "ProductName" } | select UninstallString

or

gci "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "ProductName" } | select UninstallString

( Replace  'ProductName' with the Post-install component to be removed, for example 'Bentley DGN Index Service )

This will present a path that can be used, for example :

UninstallString
---------------
MsiExec.exe /X{2E873893-A883-4C06-8308-7B491D58F3D6}

This path can be used to uninstall the product silently :

Start-Process "MsiExec.exe" -ArgumentList "/X{2E873893-A883-4C06-8308-7B491D58F3D6} /quiet" -Wait

See Also

The Help Section - Readme > Installation > Quickinstall Guide  for the latest information

https://communities.bentley.com/products/microstation/w/microstation__wiki/28704/microstation-connect---how-to-create-a-deployment-image