Skip to content

Commit d000c42

Browse files
authored
Add note about stopping before upgrade on Windows (#15)
1 parent 177fb41 commit d000c42

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

docs/toolhive/guides-cli/install.mdx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,17 @@ brew upgrade thv
155155

156156
</TabItem>
157157
<TabItem value='winget' label='WinGet (Windows)'>
158+
:::note
159+
160+
On Windows, you must stop all running MCP servers before upgrading ToolHive,
161+
otherwise the upgrade will fail because Windows locks the executable while it
162+
runs.
163+
164+
Run `thv stop <server-name>` to stop each server. After you complete the
165+
upgrade, restart them using `thv restart <server-name>`.
166+
167+
:::
168+
158169
If you installed ToolHive via WinGet, upgrade it with:
159170

160171
```bash
@@ -326,6 +337,44 @@ If you see "permission denied" errors when running ToolHive:
326337
[Docker documentation](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user)
327338
for more details.
328339

340+
### Upgrade error on Windows
341+
342+
If you encounter an error when upgrading ToolHive on Windows, it may be due to
343+
the ToolHive executable being locked by a running MCP server proxy.
344+
345+
```text title="Error example"
346+
An unexpected error occurred while executing the command:
347+
remove: Access is denied.: "C:\Users\USERNAME\AppData\Local\Microsoft\WinGet\Packages\stacklok.thv_Microsoft.Winget.Source_8wekyb3d8bbwe\thv.exe"
348+
Uninstall failed with exit code: 0x8a150003 : Executing command failed
349+
```
350+
351+
To resolve this:
352+
353+
1. Stop all running MCP servers:
354+
355+
```powershell
356+
thv list
357+
thv stop <server-name>
358+
# repeat for each server
359+
```
360+
361+
2. After stopping all servers, run the upgrade command again:
362+
363+
```powershell
364+
winget upgrade stacklok.thv
365+
```
366+
367+
3. If you still encounter issues, check if any ToolHive processes are still
368+
running in the background. You can use Task Manager to end any lingering
369+
`thv.exe` processes.
370+
371+
4. Restart your MCP servers:
372+
373+
```powershell
374+
thv restart <server-name>
375+
# repeat for each server
376+
```
377+
329378
### Other issues
330379

331380
For other installation issues, check the

0 commit comments

Comments
 (0)