How do I uninstall and reinstall MathWorks Service Host?

86 views (last 30 days)
How do I uninstall and reinstall MathWorks Service Host?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 24 Oct 2022
Edited: MathWorks Support Team on 24 Oct 2022
The MathWorks Service Host is used with specific licensing and MATLAB Drive Connector. Uninstalling and reinstalling MathWorks Service Host may be necessary if you are encountering startup issues with either of these. The steps below should help you accomplish this.
1. End the process
Windows
  1. Open Task Manager. This is often done by pressing Ctrl+Alt+Delete on your keyboard
  2. If you do not see tabs such as "Processes" & "Performance", select "More details" in the bottom left corner of the Window.
  3. Navigate to the "Details" tab near the top of the Window
  4. Find MathWorksServiceHost
  5. Highlight it and select "End Task" in the bottom right corner of the Window
MacOS
  1. Open the app Terminal by searching for it Spotlight Search. Spotlight Search is the magnifying glass in the top right corner of your Mac OS screen.
  2. Type in run killall MathWorksServiceHost
  3. Press enter/return on your keyboard.
Linux
  1. Open Terminal. Doing this will vary depending on your Linux distribution
  2. Type in run killall MathWorksServiceHost
  3. Press enter on your keyboard.
2. Uninstall the MathWorks Service Host
Windows
We first need to make sure that we can view hidden folders inside of File Explorer. If you have already enabled this, you may skip this section.
Displaying Hidden Folders and Files
  1. Click on the Start Menu
  2. Type in "Control Panel"
  3. Open the first result, which should be Control Panel
  4. Type in "hidden". You may need to click on the search bar in the top right of the window to start searching.
  5. Click on "Show hidden files and folders"
  6. Under the section that says "Hidden files and folders", select "Show hidden files, folders, and drives"
  7. Click "OK". You may close out Control Panel.
Uninstalling MathWorks Service Host
  1. Press Windows Key+R on your keyboard
  2. Type in C:\Users\%username%\AppData\Local\MathWorks\ServiceHost\ and then press enter on your keyboard.
  3. Go into the folder named with whichever version you have installed (for example: v1.13.1.7.) You may have multiple versions installed. This means you'll need to repeat the steps 3-6 for each version you have installed.
  4. Go into the folder named "mci", then, "bin", and then "win64"
  5. Find the file labeled "UninstallMathWorksServiceHost". Double-click on it.
  6. The uninstallation will run without any window displaying. After a few moments, it will be completed.
  7. Go back into the ServiceHost folder. Delete the folder with the version name that you just uninstalled.
  8. Delete the LastInstall.​info file
  9. Go up into the MathWorks folder. (C:\Users\%username%\AppData\Local\MathWorks)
  10. Delete the MATLABConnector folder. If you don't see it, then make sure you have enabled the ability to view hidden folders the section above this one, labeled "Displaying Hidden Folders and Files" will instruct you how to do this.
MacOS
  1. Open Finder
  2. In the top left corner of your screen, you should see buttons such as "File, Edit, View". Select "Go".
  3. Select the second-to-last option "Go to Folder..."
  4. Type in the following: ~/Library/Application Support/MathWorks
  5. Press enter/return on your keyboard.
  6. Delete the MATLABConnector folder.
  7. Go into the folder named "ServiceHost"
  8. Delete any folders that start with the letter "v".
  9. Delete the file named LatestInstall.​info
Linux
Please note that some of the folders that you will be navigating into are hidden folders. You may need to perform additional commands or enable the ability to view hidden folders with your file explorer. Doing this will vary depending on your Linux distribution and file explorer used.
  1. Go to the following folder: /home/$USER/.MathWorks/ServiceHost/$HOSTNAME/
  2. Go into the folder named with whichever version you have installed (for example: v1.13.1.7.) You may have multiple versions installed. This means you'll need to repeat the steps 3-6 for each version you have installed.
  3. Go into the folder named "mci", then, "bin", and then "glnxa64"
  4. Find the script labeled "UninstallMathWorksServiceHost.sh". Execute the script.
  5. The uninstallation may run without any window displaying. After a few moments, it will be completed.
  6. Go back into the ServiceHost folder. Delete the folder with the version name that you just uninstalled.
  7. Delete the LastInstall.​info file
  8. Go back into the $HOSTNAME folder (/home/$USER/.MathWorks/ServiceHost/$HOSTNAME/)
  9. Delete the MATLABConnector folder.
  10. Go to your user's home folder (/home/$USER/)
  11. Delete the folder named ".MATLABConnector".
3. Reinstall the MathWorks Service Host
All Operating Systems
  1. Download the latest MATLAB Drive Connector Installer from this link: Install MATLAB Drive Connector
  2. Run the file that is downloaded.
  3. Allow the installer to finish installing MathWorks Service Host.
  4. If you are prompted to setup MATLAB Drive Connector, you may quit this window, unless you plan to use MATLAB Drive.
You may try to launch MATLAB to see if your issue has been resolved. 

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by