locked
OneDrive Updates showing command Prompts RRS feed

  • Question

  • Hi, The command prompt is disabled by group policy at our company as requested by our security advisor based on a window 10 Hardening document. The problem is that OneDrive appears to use command prompt to do its updates and users are presented with two command prompt windows regularly informing them that the command prompt has been disabled by their administrator.  task manager shows that the prompts are initiated by OneDriveStandaloneUpdater.exe.

    examples of the two processes as below -

    "C:\Windows\System32\cmd.exe" /q /c rmdir /s /q "C:\Users\USERNAME\AppData\Local\Microsoft\OneDrive\18.151.0729.0012\amd64"
    "C:\Windows\System32\cmd.exe" /q /c rmdir /s /q "C:\Users\USERNAME\AppData\Local\Microsoft\OneDrive\18.151.0729.0012"

    Is there any way to stop these command prompts appearing apart from trying to convince a security guy to remove the cmd prompt block policy?


    MCSA, MCSE

    Friday, November 9, 2018 1:17 AM

Answers

  • Yes, it is just what I want to tell you.

    Since your company needs to disable CMD, there is no way to stop the command prompts appearing when OneDrive update itself. Therefore, I suggest to disable it from task scheduler. Once you need OneDrive update, re-enable it and see the command prompt a time, then disable OneDrive task.

    Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by Paul Klerkx Tuesday, November 13, 2018 10:24 PM
    Monday, November 12, 2018 7:16 AM
  • For a little more clarity for anybody reading this later.  

    The Semi Annual Channel updates won't resolve this as they may update the main exe, but this is caused by the user specific update.  

    If the cmd prompt is disabled, the scheduled task still runs and updates Onedrive.  This isn't an issue.  The cmd prompt alerts are from a secondary process called to delete the old version directories from the users profile. These directories are normally under 5MB each, so aren't a real problem unless you have share computers, where these might amount to a lot after a couple of years of updates.  

    Your choices then are to either disable the entire update process via a powershell (Disable-ScheduledTask) script deployment.  Main problem there is that there will be multiple OnedriveUpdater scheduled tasks with guids on some and you will need to deploy something at least a couple of times a year to do the update where users will likely need to deal with the two prompts or onedrive will get too far out of date. 

    OR the tasks could be modified to only run every 6 months at which point the users still get the cmd prompt alerts and old version folders aren't deleted.  

    Alternately you can leave the task and users will need to close the two prompts each time Onedrive updates, just more often.  (Also your old onedrive directories will not be deleted)

    Caveats with all options, just need to choose the one that works the best.  


    MCSA, MCSE

    Tuesday, November 13, 2018 1:19 AM

All replies

  • Hi,

    Disable the Scheduled Task to Prevent OneDrive Auto Updates

    To prevent OneDrive from automatically updating itself, simply disable the scheduled task.

    Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, November 12, 2018 2:47 AM
  • Thanks for the response, that will probably do.  in a perfect world, I would like it to stay updated, but the semi Annual channel updates will probably update it anyway, so it should never get too far out of date.  If it does, then users may need to put up with me turning the task back on once or twice a year and getting some prompts.  

    MCSA, MCSE

    Monday, November 12, 2018 6:10 AM
  • Yes, it is just what I want to tell you.

    Since your company needs to disable CMD, there is no way to stop the command prompts appearing when OneDrive update itself. Therefore, I suggest to disable it from task scheduler. Once you need OneDrive update, re-enable it and see the command prompt a time, then disable OneDrive task.

    Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by Paul Klerkx Tuesday, November 13, 2018 10:24 PM
    Monday, November 12, 2018 7:16 AM
  • For a little more clarity for anybody reading this later.  

    The Semi Annual Channel updates won't resolve this as they may update the main exe, but this is caused by the user specific update.  

    If the cmd prompt is disabled, the scheduled task still runs and updates Onedrive.  This isn't an issue.  The cmd prompt alerts are from a secondary process called to delete the old version directories from the users profile. These directories are normally under 5MB each, so aren't a real problem unless you have share computers, where these might amount to a lot after a couple of years of updates.  

    Your choices then are to either disable the entire update process via a powershell (Disable-ScheduledTask) script deployment.  Main problem there is that there will be multiple OnedriveUpdater scheduled tasks with guids on some and you will need to deploy something at least a couple of times a year to do the update where users will likely need to deal with the two prompts or onedrive will get too far out of date. 

    OR the tasks could be modified to only run every 6 months at which point the users still get the cmd prompt alerts and old version folders aren't deleted.  

    Alternately you can leave the task and users will need to close the two prompts each time Onedrive updates, just more often.  (Also your old onedrive directories will not be deleted)

    Caveats with all options, just need to choose the one that works the best.  


    MCSA, MCSE

    Tuesday, November 13, 2018 1:19 AM
  • A good clarification.

    Please mark your reply to remind forum user find out the helpful information.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, November 13, 2018 8:37 AM