{"id":8706,"date":"2020-02-11T11:13:43","date_gmt":"2020-02-11T19:13:43","guid":{"rendered":"https:\/\/www.coretechnologies.com\/blog\/?p=8706"},"modified":"2023-02-04T06:30:10","modified_gmt":"2023-02-04T14:30:10","slug":"windows-service-not-deleting-files","status":"publish","type":"post","link":"https:\/\/www.coretechnologies.com\/blog\/onedrive\/windows-service-not-deleting-files\/","title":{"rendered":"Q&#038;A: Why doesn&#8217;t OneDrive Delete my Files when Running as a Windows Service? [RESOLVED]"},"content":{"rendered":"<div align=\"center\"><img decoding=\"async\" src=\"\/blog\/images\/qa-onedrive-problem.png\" title=\"Q&#038;A - OneDrive Not Deleting Files\" alt=\"Q&#038;A - OneDrive Not Deleting Files\" border=\"0\" ><\/div>\n<div class=\"blog-qa-question-box\">\n<img decoding=\"async\" src=\"\/images\/quotes-transparent-21x21.png\">&nbsp;&nbsp;Our client has AlwaysUp 11.8.3.74 installed on a Windows Server 2019 platform and uses it to deliver OneDrive as a service.<\/p>\n<p>This was set up as per <a href=\"https:\/\/www.coretechnologies.com\/products\/AlwaysUp\/Apps\/RunOneDriveAsAService.html\">your guide<\/a> back in August, however, recently we have noticed some issues with OneDrive sync functionality. <\/p>\n<p>My problem is, if I delete a file in OneDrive via the web interface, OneDrive started by AlwaysUp (in this session or background, it doesn\u2019t make any difference) will not delete the file in the local PC folder. If I stop the service and start OneDrive  manually via the Start Menu, the file will be deleted immediately.<\/p>\n<p>Everything is working fine, except deleting file via web interface and syncing this deletion to the PC.<\/p>\n<p>Looking forward to your help.<\/p>\n<p align=\"right\">&mdash; Bernd<\/p>\n<\/div>\n<div style=\"margin-top:30px;margin-bottom:30px;\">\n  <img decoding=\"async\" style=\"vertical-align:middle\" src=\"\/blog\/images\/note_ok-48x48.png\"> <b>June 11 2021<\/b>: This issue has been resolved (<a href=\"#resolution\">jump to the details<\/a>).\n<\/div>\n<p>Hi Bernd, sorry to hear of the problem! We investigated and here is what we found out:<\/p>\n<h2 class=\"blog-caption\">The problem exists in OneDrive for Windows Version 19.192 (November 13, 2019)<\/h2>\n<p>We were able to reproduce the issue described on two Windows 10 test machines &mdash; one with version 1809 and the other running version 1903. We performed the following steps:<\/p>\n<ol>\n<li>\n<p>Downloaded and installed <a href=\"https:\/\/support.office.com\/en-us\/article\/onedrive-release-notes-845dcf18-f921-435e-bf28-4e24b95e5fc0\" target=\"_blank\" rel=\"noopener noreferrer\">OneDrive Version 19.192.0926.0012<\/a>.<\/p>\n<\/li>\n<li>\n<p>Followed our <a href=\"\/products\/AlwaysUp\/Apps\/RunOneDriveAsAService.html\">step-by-step our tutorial<\/a> showing how to setup OneDrive as a Windows Service.<\/p>\n<\/li>\n<li>\n<p>Started OneDrive as a Windows Service (in the background, in Session 0).<\/p>\n<\/li>\n<li>\n<p>Logged in to OneDrive online.<\/p>\n<\/li>\n<li>\n<p>Deleted a file from the website.<\/p>\n<\/li>\n<li>\n<p>On the local PC, opened File Explorer to the OneDrive folder holding the file just deleted.<\/p>\n<\/li>\n<li>\n<p>Waited two minutes for the file to disappear from the local folder.<\/p>\n<\/li>\n<\/ol>\n<p>Unfortunately the file was never removed!<\/p>\n<p>When we stopped the OneDrive service and restarted OneDrive normally on the desktop, the file was quickly removed from the local PC &mdash; just as you experienced.<\/p>\n<h2 class=\"blog-caption\">Additions, renames and other file operations work fine<\/h2>\n<p>It seems that the problem is indeed limited to the propagation of online deletions.<\/p>\n<p>We confirmed that these operations worked flawlessly, with changes synchronized between the OneDrive website and the PC in a few seconds:<\/p>\n<ul>\n<li>\n<p>Adding a file to the OneDrive website<\/p>\n<\/li>\n<li>\n<p>Adding a file to the OneDrive folder on the local computer<\/p>\n<\/li>\n<li>\n<p>Deleting a file from the OneDrive folder on the local computer<\/p>\n<\/li>\n<\/ul>\n<h2 class=\"blog-caption\">Deletions work properly with Files On Demand<\/h2>\n<p>Curiously, online file deletions are reflected on the local PC in one scenario &mdash; when <a href=\"\/blog\/software\/onedrive-slow-disable-files-on-demand\/\" target=\"_blank\" rel=\"noopener noreferrer\">Files On Demand (FoD)<\/a> is engaged and the file has not yet been downloaded to the local computer.<\/p>\n<p>When we executed the test above with FoD on, the file (or rather the &#8220;stub&#8221; representing the file) was quickly removed after its counterpart was deleted online.<\/p>\n<h2 class=\"blog-caption\">Awaiting a fix from Microsoft<\/h2>\n<p>We&#8217;ve posted a <a href=\"https:\/\/onedrive.uservoice.com\/forums\/913522-onedrive-on-windows\/suggestions\/39453772-files-not-deleted-from-the-pc-when-onedrive-is-run\" target=\"_blank\" rel=\"noopener noreferrer\">message to the OneDrive forum<\/a> asking for help but so far there has been no word from the folks in Redmond.<\/p>\n<p>Hopefully Microsoft will provide a fix soon. We will be sure to let you know if we come up with a workaround before then.<\/p>\n<hr style=\"margin-top:30px\">\n<p><a name=\"resolution\"><\/a><\/p>\n<h2 class=\"blog-caption\">UPDATE: Fixed in AlwaysUp version 12.8 (June 2021)<\/h2>\n<p>If you are encountering this problem, please:<\/p>\n<ul>\n<li>\n<p>Upgrade to the <a href=\"\/products\/AlwaysUp\/Download.html\" target=\"_blank\" rel=\"noopener\">latest version of AlwaysUp<\/a>.<\/p>\n<\/li>\n<li>\n<p>Edit OneDrive in AlwaysUp and check the <b>Launch the application without admin rights<\/b> option on the <b>Logon<\/b> tab:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/onedrive-windows-service-logon-tab-restrict.png\" class=\"zoomPopup\" title=\"OneDrive Windows Service: Run Restricted\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/onedrive-windows-service-logon-tab-restrict.png\" title=\"OneDrive Windows Service: Run Restricted (click to enlarge)\" alt=\"OneDrive Windows Service: Run Restricted\" border=\"0\" \/><\/a><\/div>\n<\/li>\n<li>\n<p>Save your changes.<\/p>\n<\/li>\n<\/ul>\n<p>When you next start OneDrive from AlwaysUp, all operations will work properly &mdash; including deletions.<\/p>\n<div align=\"center\">\n<div class=\"cta-button-1\">\n<table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"left\">\n<tbody>\n<tr>\n<td align=\"center\"><a href=\"\/blog\/tag\/onedrive\/\" title=\"More about running OneDrive as a Windows Service\"><span><nobr>Read more articles about OneDrive&#8230;<\/nobr><\/span><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<!-- relpost-thumb-wrapper --><div class=\"relpost-thumb-wrapper\"><!-- filter-class --><div class=\"relpost-thumb-container\"><style>.relpost-block-single-image, .relpost-post-image { margin-bottom: 10px; }<\/style><h3>You may also like...<\/h3><div style=\"clear: both\"><\/div><div style=\"clear: both\"><\/div><!-- relpost-block-container --><div class=\"relpost-block-container relpost-block-column-layout\" style=\"--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2\"><a href=\"https:\/\/www.coretechnologies.com\/blog\/windows-services\/interact-with-desktop\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Q&amp;A: Why doesn&#039;t Allow service to interact with desktop work?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/qa-150x150.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Q&amp;A: Why doesn&#039;t &quot;Allow service to interact with desktop&quot; work?<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/run-batch-file-once-a-day\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Q&amp;A: How Do I Run My Batch File Once A Day With AlwaysUp?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/run-batch-file-once-daily-150x150-1.webp\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Q&amp;A: How Do I Run My Batch File Once A Day With AlwaysUp?<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/restart-service-no-task-scheduler\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"How to Make AlwaysUp Restart your Program Multiple Times per Day (without using the Task Scheduler)\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/stopwatch-150x150.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">How to Make AlwaysUp Restart your Program Multiple Times per Day (without using the Task Scheduler)<\/h2><\/div><\/div><\/a><\/div><!-- close relpost-block-container --><div style=\"clear: both\"><\/div><\/div><!-- close filter class --><\/div><!-- close relpost-thumb-wrapper -->","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp;Our client has AlwaysUp 11.8.3.74 installed on a Windows Server 2019 platform and uses it to deliver OneDrive as a service. This was set up as per your guide back in August, however, recently we have noticed some issues with &hellip; <a href=\"https:\/\/www.coretechnologies.com\/blog\/onedrive\/windows-service-not-deleting-files\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":8721,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[204],"tags":[83,110,127,196],"class_list":["post-8706","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-onedrive","tag-files-on-demand","tag-onedrive","tag-qa","tag-windows-services-2"],"_links":{"self":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/8706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=8706"}],"version-history":[{"count":5,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/8706\/revisions"}],"predecessor-version":[{"id":11795,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/8706\/revisions\/11795"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media\/8721"}],"wp:attachment":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=8706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=8706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=8706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}