Windows 10: Reset Network Data Usage in Windows 10

Discus and support Reset Network Data Usage in Windows 10 in Windows 10 Tutorials to solve the problem; 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 ::... Discussion in 'Windows 10 Tutorials' started by theveterans, Nov 20, 2015.

  1. Polo6RGTI Win User

    Reset Network Data Usage in Windows 10


    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[/quote]
     
    Polo6RGTI, May 7, 2017
    #31
  2. Polo6RGTI Win User

    Hi,

    Just copy the code to a new text file then change the file extension from .txt to .bat, then just double click it to run.

    Please post back if the script works.
     
    Polo6RGTI, May 7, 2017
    #32
  3. pewe Win User
    Ran it and the script window reported errors as follows

    But the wifi (don't use the Network) usage was cleared - well it showed 0.23MB on resetting.
     
  4. Polo6RGTI Win User

    Reset Network Data Usage in Windows 10

    What is the Build version of the Windows 10 installation on your computer?
     
    Polo6RGTI, May 8, 2017
    #34
  5. Polo6RGTI Win User
    @pewe please try this script. I have removed the command to disable the Data Usage service(DusmSvc).

    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. 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. 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[/quote]
     
    Polo6RGTI, May 8, 2017
    #35
  6. Polo6RGTI Win User
    If you have a network adapter with an active connection the Data Usage counter will show "< 1 MB" or greater even right after running the Data Usage reset script.
     
    Polo6RGTI, May 8, 2017
    #36
  7. pewe Win User
    That did the trick. *Thumbs
     
  8. Polo6RGTI Win User

    Reset Network Data Usage in Windows 10

    I've updated the script. Only the Diagnostic Policy Service(DPS) is required to be stopped when resetting the Data Usage. I have also changed the wording that is displayed and the script will now also automatically exit when the task is completed. Any feedback will be appreciated.

    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 Commencing with Data Usage Reset: ECHO. ECHO Stopping Diagnostic Policy Service ECHO. net stop DPS > NUL 2>&1 ECHO. ECHO Resetting Data Usage echo Y | del /f /q "C:\Windows\System32\sru\*.*" > nul ECHO. ECHO Restarting Diagnostic Policy Service ECHO. net start DPS > NUL 2>&1 ECHO. ECHO Data Usage was Reset to 0 ECHO. ECHO Closing in 5 Seconds.... ping 127.0.0.1 -n 6 >nul 2>&1 exit[/quote]
     
    Polo6RGTI, May 8, 2017
    #38
  9. pewe Win User
    Worked nicely.

    I don't suppose it would be a simple task to record the stats to a file before clearing them - or is it???*Huh
    Something that could maybe be copied to a spreadsheet ??!!!!
     
  10. Polo6RGTI Win User
    Hi,

    I have already started searching for commands to do exactly that or at least to a text file. I have no formal training in coding so it may take me a while to get it right.
     
    Polo6RGTI, May 9, 2017
    #40
  11. Polo6RGTI Win User
    I have updated the script again. I added a Y/N option and a color change when yes is selected.

    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 CHOICE /C:YN /M "Do you want to reset the Data Usage now?" IF ERRORLEVEL 2 goto no IF ERRORLEVEL 1 goto yes :yes COLOR 2F ECHO. ECHO Commencing with Data Usage Reset: ECHO. ECHO Stopping Diagnostic Policy Service ECHO. net stop DPS > NUL 2>&1 ECHO Resetting Data Usage ECHO Y | del /f /q "C:\Windows\System32\sru\*.*" > nul ECHO. ECHO Restarting Diagnostic Policy Service ECHO. net start DPS > NUL 2>&1 ECHO. CLS ECHO Data Usage was Reset to 0 ECHO. ECHO Closing in 5 Seconds.... ping 127.0.0.1 -n 6 >nul 2>&1 exit :no exit[/quote]
     
    Polo6RGTI, May 9, 2017
    #41
  12. pewe Win User
    A useful addition to the script for many I think.
    However, I haven't tried this because I use 4G for my broadband, not a landline, and my metered allowance starts on 4th of each month - so I have set up a schedule to run the script at 00:00:01am on the 4th of every month and a pause to accept running the script is not practical.
     
  13. Polo6RGTI Win User

    Reset Network Data Usage in Windows 10

    I have removed the Y/N option and the pause in the script.
    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. ECHO Commencing with Data Usage Reset: ECHO. ECHO Stopping Diagnostic Policy Service ECHO. net stop DPS > NUL 2>&1 ECHO Resetting Data Usage ECHO Y | del /f /q "C:\Windows\System32\sru\*.*" > nul ECHO. ECHO Restarting Diagnostic Policy Service ECHO. net start DPS > NUL 2>&1 ECHO. CLS ECHO Data Usage was Reset to 0 exit[/quote]
     
    Polo6RGTI, May 9, 2017
    #43
  14. Polo6RGTI Win User
    Polo6RGTI, May 10, 2017
    #44
  15. Polo6RGTI Win User
    I'm updating the script to include more features.
     
    Polo6RGTI, May 11, 2017
    #45
Thema:

Reset Network Data Usage in Windows 10

Loading...
  1. Reset Network Data Usage in Windows 10 - Similar Threads - Reset Network Data

  2. Massive data usage by "System" in network usage statistics.

    in Windows 10 Gaming
    Massive data usage by "System" in network usage statistics.: What could be causing this? I have downloaded a few games on Gamepass, but nowhere near 1tb+ They only add up to 150gb. None of the games have updated. I'm currently using a 4g unlimited connection but unfortunately my 4g provider has a FUP fair usage policy and i don't...
  3. Massive data usage by "System" in network usage statistics.

    in Windows 10 Software and Apps
    Massive data usage by "System" in network usage statistics.: What could be causing this? I have downloaded a few games on Gamepass, but nowhere near 1tb+ They only add up to 150gb. None of the games have updated. I'm currently using a 4g unlimited connection but unfortunately my 4g provider has a FUP fair usage policy and i don't...
  4. Network Data Usage stuck at 0Mb

    in Windows 10 Network and Sharing
    Network Data Usage stuck at 0Mb: Hello, I used to have this problem where the data usage would never count. Now I have it working smoothly through some research and would like to share that information to others as Microsoft hasn't addressed this issue. Some of you may not know that, you can view your...
  5. Cellular network data usage notification

    in Windows 10 Network and Sharing
    Cellular network data usage notification: I have a large number of windows 10 Enterprise users tho regularly use their mobile/cellular connections. I want all users to receive notifications/warning from Windows 10 when they reach 2 or 4 GB of data usage on the Mobile/Cellular but I cannot find a way to do this with...
  6. Data usage, windows 10.

    in Windows 10 Network and Sharing
    Data usage, windows 10.: Can you point me to the best fixes to stop Win 10 using so much data, no videos being watched, maybe looking a photos on usedguns, too much, not much else. 45454
  7. Data Usage - How to Reset ?

    in Windows 10 Network and Sharing
    Data Usage - How to Reset ?: ....... does anybody got an idea how to reset the Data Usage back to 0 ? Any help would be greatly appreciated ....... 14216
  8. Resetting Windows 10 Data usage meter

    in Windows 10 Network and Sharing
    Resetting Windows 10 Data usage meter: Is there any way to reset the WiFi Data Usage meter each month? 11967
  9. How to reset Data Usage ?

    in Windows 10 Network and Sharing
    How to reset Data Usage ?: In Settings > Network & Internet > Data Usage : data usage is monitored this day to one month back , this is entirely useless since usually people try to monitor their usage since last bill , windows 8.1 allowed resetting of counter in any specific day so the counter can...
  10. View Network Data Usage Details in Windows 10

    in Windows 10 Tutorials
    View Network Data Usage Details in Windows 10: How to: View Network Data Usage Details in Windows 10 How View Network Data Usage Details in Windows 10 This tutorial will show you how to view the Wi-Fi and Ethernet network data usage details of apps from the last 30 days on your Windows 10 PC. Microsoft is making...

Users found this page by searching for:

  1. DusmSvc Data Usage