[GH-ISSUE #1721] Update error Access Denied due to service not being stopped on Windows #1273

Open
opened 2026-05-05 07:41:22 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @jmartens on GitHub (Jul 20, 2022).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1721

What happened?

The windows installer seems not to stop barrier service(s) causing access denied errors when trying to copy barrrierd.exe.

A pop was shown, stopped the service manually. Hit the retry button in the pop-up and installation continued and finished successful.

Version

v2.4.0

Git commit hash (if applicable)

No response

If applicable, where did you install Barrier from?

Using winget update --all:

(11/23) Found Barrier [DebaucheeOpenSourceGroup.Barrier] Version 2.4.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/debauchee/barrier/releases/download/v2.4.0/BarrierSetup-2.4.0-release.exe
  ██████████████████████████████  8.84 MB / 8.84 MB
Successfully verified installer hash
Starting package install...
Successfully installed

What OSes are you seeing the problem on? (Check all that apply)

Windows

What OS versions are you using?

image

Relevant log output

From the install log:

2022-07-20 14:37:26.160   -- File entry --
2022-07-20 14:37:26.162   Dest filename: C:\Program Files\Barrier\barrierd.exe
2022-07-20 14:37:26.162   Time stamp of our file: 2021-11-01 21:19:20.000
2022-07-20 14:37:26.162   Dest file exists.
2022-07-20 14:37:26.162   Time stamp of existing file: 2020-07-14 17:43:10.000
2022-07-20 14:37:26.162   Installing the file.
2022-07-20 14:37:26.183   DeleteFile: The existing file appears to be in use (5). Retrying.
2022-07-20 14:37:27.192   DeleteFile: The existing file appears to be in use (5). Retrying.
2022-07-20 14:37:28.207   DeleteFile: The existing file appears to be in use (5). Retrying.
2022-07-20 14:37:29.214   DeleteFile: The existing file appears to be in use (5). Retrying.
2022-07-20 14:37:30.230   Message box (Abort/Retry/Ignore):
                          C:\Program Files\Barrier\barrierd.exe
                          
                          An error occurred while trying to replace the existing file:
                          DeleteFile failed; code 5.
                          Access is denied.
                          
                          Click Retry to try again, Ignore to skip this file (not recommended), or Abort to cancel installation.
2022-07-20 14:38:35.568   User chose Retry.
2022-07-20 14:38:35.569   Dest filename: C:\Program Files\Barrier\barrierd.exe
2022-07-20 14:38:35.569   Time stamp of our file: 2021-11-01 21:19:20.000
2022-07-20 14:38:35.569   Dest file exists.
2022-07-20 14:38:35.569   Time stamp of existing file: 2020-07-14 17:43:10.000
2022-07-20 14:38:35.569   Installing the file.
2022-07-20 14:38:35.617   Successfully installed the file.
...

Any other information

Suggestion: Stop service before installing and start service after successful installation (if it was started before installation)

Originally created by @jmartens on GitHub (Jul 20, 2022). Original GitHub issue: https://github.com/debauchee/barrier/issues/1721 ### What happened? The windows installer seems not to stop barrier service(s) causing access denied errors when trying to copy barrrierd.exe. A pop was shown, stopped the service manually. Hit the retry button in the pop-up and installation continued and finished successful. ### Version v2.4.0 ### Git commit hash (if applicable) _No response_ ### If applicable, where did you install Barrier from? Using winget update --all: ``` (11/23) Found Barrier [DebaucheeOpenSourceGroup.Barrier] Version 2.4.0 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://github.com/debauchee/barrier/releases/download/v2.4.0/BarrierSetup-2.4.0-release.exe ██████████████████████████████ 8.84 MB / 8.84 MB Successfully verified installer hash Starting package install... Successfully installed ``` ### What OSes are you seeing the problem on? (Check all that apply) Windows ### What OS versions are you using? ![image](https://user-images.githubusercontent.com/593327/179985112-ba9f1ae9-0451-49bf-ade9-7612fba977e3.png) ### Relevant log output From the install log: ```cmd 2022-07-20 14:37:26.160 -- File entry -- 2022-07-20 14:37:26.162 Dest filename: C:\Program Files\Barrier\barrierd.exe 2022-07-20 14:37:26.162 Time stamp of our file: 2021-11-01 21:19:20.000 2022-07-20 14:37:26.162 Dest file exists. 2022-07-20 14:37:26.162 Time stamp of existing file: 2020-07-14 17:43:10.000 2022-07-20 14:37:26.162 Installing the file. 2022-07-20 14:37:26.183 DeleteFile: The existing file appears to be in use (5). Retrying. 2022-07-20 14:37:27.192 DeleteFile: The existing file appears to be in use (5). Retrying. 2022-07-20 14:37:28.207 DeleteFile: The existing file appears to be in use (5). Retrying. 2022-07-20 14:37:29.214 DeleteFile: The existing file appears to be in use (5). Retrying. 2022-07-20 14:37:30.230 Message box (Abort/Retry/Ignore): C:\Program Files\Barrier\barrierd.exe An error occurred while trying to replace the existing file: DeleteFile failed; code 5. Access is denied. Click Retry to try again, Ignore to skip this file (not recommended), or Abort to cancel installation. 2022-07-20 14:38:35.568 User chose Retry. 2022-07-20 14:38:35.569 Dest filename: C:\Program Files\Barrier\barrierd.exe 2022-07-20 14:38:35.569 Time stamp of our file: 2021-11-01 21:19:20.000 2022-07-20 14:38:35.569 Dest file exists. 2022-07-20 14:38:35.569 Time stamp of existing file: 2020-07-14 17:43:10.000 2022-07-20 14:38:35.569 Installing the file. 2022-07-20 14:38:35.617 Successfully installed the file. ... ``` ### Any other information Suggestion: Stop service before installing and start service after successful installation (if it was started before installation)
Author
Owner

@jmartens commented on GitHub (Jul 20, 2022):

Perhaps it could be just as simple as adding CloseApplications=yes, perhaps even restart it using RestartApplications=yes.

<!-- gh-comment-id:1190265291 --> @jmartens commented on GitHub (Jul 20, 2022): Perhaps it could be just as simple as adding [`CloseApplications=yes`](https://jrsoftware.org/ishelp/index.php?topic=setup_closeapplications), perhaps even restart it using [`RestartApplications=yes`](https://jrsoftware.org/ishelp/index.php?topic=setup_restartapplications).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#1273
No description provided.