title: Command Line Uninstall - OpenVPN-2.4.7-I603
body: <p><em>SOLVED</em></p>
  
  <hr>
  
  <h2>Start-Process -FilePath "C:\Program Files\OpenVPN\Uninstall.exe" -ArgumentList "/S /qn"</h2>
  
  <p>I have been tasked with installing OpenVPN-Connect-3.0.0.272 on our 150+ remote users Windows 10 machines. The issue is that the previous version installed, OpenVPN-2.4.7-I603 is not uninstalling silently through command line; more specifically, Powershell ISE script.</p>
  
  <ol>
  <li>I have attempted uninstalling it directly by getting the name through installed applications:</li>
  </ol>
  
  <p>Get-WmiObject -Class Win32_Product</p>
  
  <p>but OpenVPN does not appear as an installed program on the list, therefore it cannot be selected to uninstall.</p>
  
  <ol start="2">
  <li>I noticed that in "C:\Program Files\OpenVPN\" there is an "Uninstall.exe" file that runs manually, so thinking along those lines:</li>
  </ol>
  
  <p>msiexec.exe /x "C:\Program Files\OpenVPN\Uninstall.exe" /qn</p>
  
  <p>and receive error "This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package."</p>
  
  <ol start="3">
  <li>Uninstall attempt via</li>
  </ol>
  
  <p>Start-Process -FilePath "C:\Program Files\OpenVPN\Uninstall.exe" -ArgumentList "/s /qn"</p>
  
  <p>successfully launches the uninstall GUI but silent mode is not enabled so it requires user interface.</p>
  
  <ol start="4">
  <li>Attempting to uninstall via UninstallString GUID found in</li>
  </ol>
  
  <p>Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenVPN</p>
  
  <p>only has a value data of "C:\Program Files\OpenVPN\Uninstall.exe" and not a GUID.</p>
  
  <p>What am I missing so this can be uninstalled silently?</p>