OneDrive.bat out of date?

Page 2 of 5 FirstFirst 1234 ... LastLast

  1. Posts : 7,607
    Windows 10 Home 20H2
       #11

    Disk2019 said:
    Get-ScheduledTask -TaskName *OneDrive*
    Months ago, I removed OneDrive via Apps & features.
    Seconds ago, I ran Get-ScheduledTask "OneDrive*" and got nothing.
      My Computer


  2. Posts : 14,018
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #12

    Top image is what I have for OneDrive that hasn't been used, bottom image is the result of the code shown.
    OneDrive.bat out of date?-onedrive.png
      My Computers


  3. Posts : 7,607
    Windows 10 Home 20H2
       #13

    OneDrive.bat out of date?-image-1.jpg
      My Computer


  4. Posts : 7,607
    Windows 10 Home 20H2
       #14

    OneDrive tasks can be deleted by:

    Get-ScheduledTask "OneDrive*" | Unregister-ScheduledTask -Confirm:$false
      My Computer


  5. Posts : 194
    Windows 10
    Thread Starter
       #15

    Matthew Wai said:
    OneDrive tasks can be deleted by:

    Get-ScheduledTask "OneDrive*" | Unregister-ScheduledTask -Confirm:$false

    If you uninstall it, doesn't it get deleted automatically?
      My Computer


  6. Posts : 7,607
    Windows 10 Home 20H2
       #16

    Have I said that the tasks were not deleted automatically when I uninstalled OneDrive?
      My Computer


  7. Posts : 5,452
    Windows 11 Home
       #17

    Matthew Wai said:
    Have I said that the tasks were not deleted automatically when I uninstalled OneDrive?
    I have only one left, which I disable, also its services and startup entries.

    Code:
    rem Remove OneDrive
    taskkill /F /IM onedrive.exe
    "%SYSTEMROOT%\System32\OneDriveSetup.exe" /uninstall
    "%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe" /uninstall
    rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S
    rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S
    rd "%USERPROFILE%\OneDrive" /Q /S
    
    rem 0 - Remove from Windows Explorer
    reg add "HKCR\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "0" /f
    reg add "HKCR\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "0" /f
    reg add "HKCU\Software\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "0" /f
    reg add "HKCU\Software\Classes\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "0" /f
    
    rem Hide One Drive Icon on Desktop
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v "{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /t REG_DWORD /d "1" /f
    
    rem Disable network traffic pre user sign-in
    reg add "HKLM\Software\Policies\Microsoft\OneDrive" /v "PreventNetworkTrafficPreUserSignIn" /t REG_DWORD /d "1" /f
    
    rem 1 - Disable sync files to One Drive
    reg add "HKCU\Software\Microsoft\OneDrive" /v "DisablePersonalSync" /t REG_DWORD /d "1" /f
    reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSync" /t REG_DWORD /d "1" /f
    reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSyncNGSC" /t REG_DWORD /d "1" /f
    reg add "HKLM\Software\Wow6432Node\Policies\Microsoft\Windows\Onedrive" /v "DisableFileSyncNGSC" /t REG_DWORD /d "1" /f
    
    rem 1 - Disable saving Libraries to OneDrive
    reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v "DisableLibrariesDefaultSaveToOneDrive" /t REG_DWORD /d "0" /f
    reg add "HKLM\Software\Wow6432Node\Policies\Microsoft\Windows\Onedrive" /v "DisableLibrariesDefaultSaveToOneDrive" /t REG_DWORD /d "1" /f
    
    rem 1 - Disable Sync over metered network
    reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v "DisableMeteredNetworkFileSync" /t REG_DWORD /d "1" /f
    reg add "HKLM\Software\Wow6432Node\Policies\Microsoft\Windows\Onedrive" /v "DisableMeteredNetworkFileSync" /t REG_DWORD /d "1" /f
    
    rem Remove Startup entry
    reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDrive" /f
    
    rem Disable Service
    sc config OneSyncSvc start= disabled
    sc config OneSyncSvc_Session1 start= disabled
    
    rem Disable Task
    schtasks /Change /TN "OneDrive Standalone Update Task v2" /Disable
      My Computer


  8. Posts : 7,607
    Windows 10 Home 20H2
       #18

    TairikuOkami said:
    I have only one left, which I disable, also its services and startup entries.
    I found no OneSyncSvc in my Services and no OneDrive in "HKCU\Software\Microsoft\Windows\CurrentVersion\Run".
      My Computer


  9. Posts : 5,452
    Windows 11 Home
       #19

    Matthew Wai said:
    I found no OneSyncSvc in my Services
    It is a hidden service.
    Code:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OneSyncSvc
      My Computer


  10. Posts : 264
    Windows 10
       #20

    SightUp said:
    Are you talking about these two lines?



    So would it be a problem to simply add the following?


    So that it reads:
    you will be overwritting the value of x64 and x86. The last variable will be used in each case. You have to use different variables!
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:32.
Find Us




Windows 10 Forums