The scenario is you have an application which was installed through MSI. And you only know the application name (in this case, the beginning part of the application name). Using msiexec command requires you to know the product GUID but the application might have different GUID for its different version. So here is the solution I came up with: quering the registry to get the list of product GUIDs (the format is always {GUID}), then match the DisplayName key with the application name.

 Here is a sample script which uninstalls applications whose names start with "Windows Live ID Sign-in Assistant": 

for /f "tokens=7 delims=\" %%i in ('reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall ^| FIND "{"') do (
  for /f "tokens=2,*" %%j in ('reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\%%i /v DisplayName') do (
    set dn=%%k
    if "!dn:~0,33!"=="Windows Live ID Sign-in Assistant" (
      echo Uninstalling Windows Live ID Sign-in Assistant
      msiexec /promptrestart /qb /x %%i /L+*v %TEMP%\wlidsvc.log
      if %ERRORLEVEL% NEQ 0 echo Uninstallation failed. Check the log %TEMP%\wlidsvc.log

That's it and it should work.