{"id":10141,"date":"2020-12-28T00:51:05","date_gmt":"2020-12-28T08:51:05","guid":{"rendered":"https:\/\/www.coretechnologies.com\/blog\/?p=10141"},"modified":"2022-04-03T22:48:34","modified_gmt":"2022-04-04T05:48:34","slug":"windows-service-unable-to-start","status":"publish","type":"post","link":"https:\/\/www.coretechnologies.com\/blog\/box-drive\/windows-service-unable-to-start\/","title":{"rendered":"Box Drive Version 2.18 Fails to Run in Session 0 (as a Windows Service)"},"content":{"rendered":"<div align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"no-lazy-load image-padding\" title=\"Box Drive Version 2.18 Fails to Run in Session 0\" src=\"\/blog\/images\/box-drive-problem.webp\" alt=\"Box Drive Version 2.18 Fails to Run in Session 0\" border=\"0\" width=\"365\" height=\"160\" \/><\/div>\n<p>Do you run <a href=\"\/products\/AlwaysUp\/Apps\/RunBoxDriveAsAWindowsService.html\">Box Drive as a Windows Service<\/a>, to ensure that file synchronization starts as soon as your server boots? If so, please be aware that <a href=\"https:\/\/support.box.com\/hc\/en-us\/articles\/360054634874-Box-Drive-v2-18-Release-Notes\" target=\"_blank\" rel=\"noopener noreferrer\">Box Drive version 2.18<\/a> may not start properly in the background!<\/p>\n<p>Version 2.18 was released in October 2020. We took it for a test drive with AlwaysUp and here is what we discovered.<\/p>\n<h2 class=\"blog-caption\">Box Drive starts but quickly exits<\/h2>\n<p>AlwaysUp started Box.exe several times. Each time, the process would run for a second and then shut down. After 5 attempts (as configured on the <a href=\"\/products\/AlwaysUp\/Screenshots\/alwaysup-add-application-restart-tab.png\">Restart tab<\/a>), AlwaysUp gave up.<\/p>\n<p>The activity report shows the back and forth:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/box-drive-service-activity.png\" class=\"zoomPopup\" title=\"Box Drive windows service activity\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/box-drive-service-activity.png\" title=\"Box Drive windows service activity (click to enlarge)\" alt=\"Box Drive windows service activity\" border=\"0\" width=\"520\" \/><\/a><\/div>\n<p>Unfortunately the Box.exe process exited with a generic return code, with no indication of what happened. Puzzled, we decided to investigate the logs.<\/p>\n<h2 class=\"blog-caption\">The log files report a strange problem<\/h2>\n<p>Box Drive spools its logs to a location in the AppData folder. You can find the files here:<\/p>\n<blockquote><p>C:\\Users\\&lt;YOUR-USER-NAME&gt;\\AppData\\Local\\Box\\Box\\logs<\/p><\/blockquote>\n<p>A file named &#8220;Box-2.18.117.log&#8221; records the program&#8217;s activities when it starts. We noticed these telltale lines inside:<\/p>\n<div class=\"code-box\">\n[36;49m2020-12-27 18:45:23.667 7596 INFO    MainThread           windows_sync_app_dele Calling start_application: [&#8216;C:\\\\Program Files\\\\Box\\\\Box\\\\Box.exe&#8217;]<br \/>\n[36;49m2020-12-27 18:45:23.667 7596 INFO    MainThread           windows_sync_app_dele Current memory usage: 90279936 bytes<br \/>\n[36;49m2020-12-27 18:45:23.667 7596 INFO    MainThread           windows_sync_app_dele <b>A Box Drive installation is in progress. Box Drive cannot continue to run<\/b>\n<\/div>\n<p>So for some bizarre reason, Box Drive thinks that an installation is in progress!<\/p>\n<p>Thinking that it may be causing a conflict, we stopped and disabled the Box Update Service (which is responsible for automatic updates):<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/box-update-service.png\" class=\"zoomPopup\" title=\"Box Update Service (BoxUpdateSvc)\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/box-update-service.png\" title=\"Box Update Service (BoxUpdateSvc) (click to enlarge)\" alt=\"Box Update Service (BoxUpdateSvc)\" border=\"0\" \/><\/a><\/div>\n<p>However, that didn&#8217;t make a difference. The &#8220;installation is in progress&#8221; error continued to thwart us.<\/p>\n<p>So clearly Box Drive is having trouble running with AlwaysUp. But was the problem caused by AlwaysUp? We decided to investigate with an independent, third-party utility.<\/p>\n<h2 class=\"blog-caption\">The problem isn&#8217;t limited to AlwaysUp &mdash; PsExec fails too<\/h2>\n<p>Microsoft&#8217;s free <a href=\"https:\/\/docs.microsoft.com\/en-us\/sysinternals\/downloads\/psexec\" target=\"_blank\" rel=\"noopener noreferrer\">PsExec<\/a> utility can start any executable in <a href=\"\/WindowsServices\/FAQ.html#WhatIsSession0Isolation\">Session 0<\/a> &mdash; the only session available when your machine boots. PsExec is useful when troubleshooting applications that have trouble running at boot.<\/p>\n<p>We ran this command line to launch Box as a specific user in Session 0:<\/p>\n<div class=\"code-box\">\nPsExec -i 0 -h -u &quot;&lt;USER-NAME&gt;&quot; -p &quot;&lt;PASSWORD&gt;&quot; -w &quot;C:\\Program Files\\Box\\Box&quot; &quot;C:\\Program Files\\Box\\Box\\Box.exe&quot;\n<\/div>\n<p>But the run ended with the same result in the logs as before.<\/p>\n<p>So the issue is not unique to AlwaysUp. For some strange reason, Box Drive version 2.18 simply refuses to run in the background, on the isolated Session 0.<\/p>\n<h2 class=\"blog-caption\">Box Drive starts properly in the current, interactive session<\/h2>\n<p>As it does when started normally on your desktop, Box Drive runs fine as a Windows Service outside of Session 0. <\/p>\n<p>If you select <b>Start &#8220;Box Drive&#8221; in this session<\/b> from the <b>Application<\/b> menu in AlwaysUp, Drive (and its familiar tray icon) will appear on your screen:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/start-box-drive-in-session.png\" class=\"zoomPopup\" title=\"Start Box.exe in your session\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/start-box-drive-in-session.png\" title=\"Start Box.exe in your session (click to enlarge)\" alt=\"Start Box.exe in your session\" border=\"0\" width=\"520\" \/><\/a><\/div>\n<p>Of course, that will not be possible unless you log in, which defeats the purpose of launching file synchronization automatically at boot! Fortunately, AlwaysUp can help you get around that.<\/p>\n<h2 class=\"blog-caption\">Configure automatic logon with AlwaysUp to start Box Drive at boot<\/h2>\n<p>Since Box needs a &#8220;normal&#8221; session to run at boot, you can:<\/p>\n<ol>\n<li>\n<p>Setup Windows autologon, to automatically sign in to Windows when your machine boots;<\/p>\n<\/li>\n<li>\n<p>Have AlwaysUp launch Box Drive in that user&#8217;s session.<\/p>\n<\/li>\n<\/ol>\n<div align=\"center\"><a href=\"\/blog\/images\/setup-autologon-for-box-drive.png\" class=\"zoomPopup\" title=\"Setup Autologon for Box Drive\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/setup-autologon-for-box-drive.png\" title=\"Setup Autologon for Box Drive (click to enlarge)\" alt=\"Setup Autologon for Box Drive\" border=\"0\" \/><\/a><\/div>\n<p>Please consult <a href=\"\/products\/AlwaysUp\/AlwaysUp_FAQ.html#AvoidSession0\">this FAQ entry<\/a> for the details.<\/p>\n<h2 class=\"blog-caption\">Box support declined to investigate the problem<\/h2>\n<p>A few weeks ago, our developers reported the problem to <a href=\"https:\/\/support.box.com\/hc\/en-us\" target=\"_blank\" rel=\"noopener noreferrer\">Box Support<\/a>. The detailed message documented all our key findings, including the log messages\/files and the two methods of easily reproducing the failure.<\/p>\n<p>The response from the Box Customer Success team was blunt, though not entirely unexpected:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/box-customer-success-response.png\" class=\"zoomPopup\" title=\"Response from the Box customer success team\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/box-customer-success-response.png\" title=\"Response from the Box customer success team (click to enlarge)\" alt=\"Response from the Box customer success team\" border=\"1\" width=\"520\" \/><\/a><\/div>\n<p>Even so, it&#8217;s a bit short sighted of them to dismiss a problem that is impacting their paying customers!<\/p>\n<h2 class=\"blog-caption\">Box Drive version 2.19 is &#8220;coming soon&#8221;<\/h2>\n<p>Apparently <a href=\"https:\/\/support.box.com\/hc\/en-us\/articles\/360060158933-Box-Drive-v2-19-Release-Notes\" target=\"_blank\" rel=\"noopener noreferrer\">version 2.19 of Box Drive<\/a> will be available very soon, probably in early 2021. Hopefully it will fix this &#8220;phantom installation&#8221; problem when running as a Windows Service.<\/p>\n<p>Fingers crossed!<\/p>\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\/alwaysup\/dropbox-selective-sync\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Q&amp;A: Does AlwaysUp Support Dropbox Selective Sync?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/dropbox-selective-sync-150x150-1-150x150.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: Does AlwaysUp Support Dropbox Selective Sync?<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/debugview-messages\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Q&amp;A: With AlwaysUp, Where Do My Application&#039;s Debug Messages Go?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/where-do-debug-messages-go-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: With AlwaysUp, Where Do My Application&#039;s Debug Messages Go?<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/dropbox-not-working\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Dropbox Version 81.4.195 (September 18, 2019) Not Working With AlwaysUp For Some Customers\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/dropbox-experiencing-issues-150x150-150x123.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\">Dropbox Version 81.4.195 (September 18, 2019) Not Working With AlwaysUp For Some Customers<\/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>Do you run Box Drive as a Windows Service, to ensure that file synchronization starts as soon as your server boots? If so, please be aware that Box Drive version 2.18 may not start properly in the background! Version 2.18 &hellip; <a href=\"https:\/\/www.coretechnologies.com\/blog\/box-drive\/windows-service-unable-to-start\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":10162,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[237],"tags":[26,238,239,153,161,170],"class_list":["post-10141","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-box-drive","tag-alwaysup-tag","tag-box-drive","tag-psexec","tag-session-0-isolation","tag-product-support","tag-troubleshooter"],"_links":{"self":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/10141","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=10141"}],"version-history":[{"count":29,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/10141\/revisions"}],"predecessor-version":[{"id":11141,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/10141\/revisions\/11141"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media\/10162"}],"wp:attachment":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=10141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=10141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=10141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}