Reset Network Data Usage in Windows 10  

Page 3 of 7 FirstFirst 12345 ... LastLast

  1. Posts : 68,862
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #20

    The warning is already in the step.

    If you are having issues from it, then you could still do a repair install without losing anything.

    Repair Install Windows 10 with an In-place Upgrade
      My Computers


  2. Posts : 9
    Windows 10
       #21

    Is there any other way of achieving what we have in mind? Or better yet - stopping it from collecting the data of Usage?
      My Computer


  3. Posts : 68,862
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #22

    Not that I'm aware of.
      My Computers


  4. Posts : 90
    Win 10 pro
       #23

    I reset my data today and find that having deleted the files they have been re-created.
    However, although the new files appear to be updating regularly the information shown in the Data Usage remains at zero.

    Anyone any thoughts??
      My Computer


  5. Posts : 68,862
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #24

    Hello pewe, :)

    If you haven't already, see if resetting your network data usage while in safe mode without networking may work better for you.
      My Computers


  6. Posts : 90
    Win 10 pro
       #25

    Brink said:
    Hello pewe, :)

    If you haven't already, see if resetting your network data usage while in safe mode without networking may work better for you.
    Thanks - I'll try that.

    I have done a system restore and all the data is back, but wonder why deleting the contents of the SRU in safe mode should make a difference.

    What I did was to 'disable' the network card and wifi in 'Device Manager', deleted the contents of the SRU directory then enabled the network and wifi in 'Device Manager again, which resulted in the files in the SRU directory being rebuilt.

    The files were being updated and growing as I used the internet, but no stats were showing in Settings/Network and Internet/Data Usage until system restore.

    What I have noticed is that when I go to Settings/Network and Internet/Data Usage the figures for Wifi and Ethernet are momentarily at zero, then the screen refreshes with the data instantly (presumably as it reads the files) but the refresh was not happening with the rebuilt files.

    As an aside - I am surprised that no one has come up with an app to use the data in the files and reset them to zero after a specific time whilst building a new file of historic data.
    With most people now having Mobile Broadband contracts with monthly data allowances that would be a very useful tool.

    For example my landline broadband is so bad due to line length that I use 4G on a 4G router from 3 UK.
    The contract has a capped monthly usage, so an easy way of monitoring my usage would be extremely useful.
      My Computer


  7. Posts : 68,862
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #26

    Safe mode is way to make sure that nothing network is in use that could prevent the data usage history from being fully reset and cleared so it doesn't return.
      My Computers


  8. Posts : 873
    Windows 11 x64 23H2 (22631.3447)
       #27

    Reset Data Usage with Simple Batch Script


    I made this batch script late last night to reset the Data Usage Overview to 0. I will appreciate any constructive comments regarding this script. I know there is the app "Reset Data Usage v1.0" to do all this, but I like to refrain from using any 3rd party apps.

    Also please note that network adaptors with active connections will be disabled when the script is run and then re-enabled at the end.

    Use "netsh interface ipv4 show subinterfaces" in command prompt to determine the correct name for each network adapter and then edit or add to the script accordingly if different from "WiFi" and "Ethernet" listed below

    Code:
    @ECHO OFF
    :: BatchGotAdmin (Run as Admin code starts)
    REM --> Check for permissions
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    REM --> If error flag set, we do not have admin.
    if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
    ) else ( goto gotAdmin )
    :UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
    "%temp%\getadmin.vbs"
    exit /B
    :gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    pushd "%CD%"
    CD /D "%~dp0"
    :: BatchGotAdmin (Run as Admin code ends)
    :: Your codes should start from the following line
    COLOR 1F
    ECHO Commensing with Data Usage Reset:
    ECHO.
    ECHO Disabling Network Adpters
    netsh interface set interface "WiFi" disabled
    netsh interface set interface "Ethernet" disabled
    ECHO.
    ECHO Stopping Data Usage Services
    ECHO.
    sc config DusmSvc start= disabled
    net stop DusmSvc > NUL 2>&1
    net stop diagnosticshub.standardcollector.service > NUL 2>&1
    net stop DPS > NUL 2>&1
    ECHO.
    ECHO Resetting Data Usage
    echo Y | del /f /q "C:\Windows\System32\sru\*.*" > nul
    ECHO.
    ECHO Restarting Data Usage Services
    ECHO.
    sc config DusmSvc start= auto
    net start DusmSvc > NUL 2>&1
    net start diagnosticshub.standardcollector.service > NUL 2>&1
    net start DPS > NUL 2>&1
    ECHO.
    ECHO Enabling Network Adapters
    netsh interface set interface "WiFi" enabled
    netsh interface set interface "Ethernet" enabled
    ECHO.
    ECHO Data Usage was Reset to 0
    ECHO.
    ECHO Press any key to exit.
    pause > nul
    :end
    Last edited by Brink; 08 May 2017 at 14:44. Reason: code box
      My Computer


  9. Posts : 90
    Win 10 pro
       #28

    If anyone wanted to use this,

    - do you mind?
    - how would the script be run ? (forgive the ignorance of a non-coder)

    Please advise


    Thanks
      My Computer


  10. Posts : 873
    Windows 11 x64 23H2 (22631.3447)
       #29

    Please ignore the script in my previous post as it is not necessary to disable network adapters to reset the Data Usage.

    Code:
    @ECHO OFF
    :: BatchGotAdmin (Run as Admin code starts)
    REM --> Check for permissions
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    REM --> If error flag set, we do not have admin.
    if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
    ) else ( goto gotAdmin )
    :UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
    "%temp%\getadmin.vbs"
    exit /B
    :gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    pushd "%CD%"
    CD /D "%~dp0"
    :: BatchGotAdmin (Run as Admin code ends)
    :: Your codes should start from the following line
    COLOR 1F
    ECHO Commensing with Data Usage Reset:
    ECHO.
    ECHO Stopping Data Usage Services
    ECHO.
    sc config DusmSvc start= disabled
    net stop DusmSvc > NUL 2>&1
    net stop diagnosticshub.standardcollector.service > NUL 2>&1
    net stop DPS > NUL 2>&1
    ECHO.
    ECHO Resetting Data Usage
    echo Y | del /f /q "C:\Windows\System32\sru\*.*" > nul
    ECHO.
    ECHO Restarting Data Usage Services
    ECHO.
    sc config DusmSvc start= auto
    net start DusmSvc > NUL 2>&1
    net start diagnosticshub.standardcollector.service > NUL 2>&1
    net start DPS > NUL 2>&1
    ECHO.
    ECHO.
    ECHO Data Usage was Reset to 0
    ECHO.
    ECHO Press any key to exit.
    pause > nul
    :end
      My Computer


 

Tutorial Categories

Reset Network Data Usage in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  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 23:59.
Find Us




Windows 10 Forums