title: How do I change mouse settings in my batch script?
body: <p>I'm trying to make a script that changes my mouse settings in the registry. When I run the script I see that the changes are made, but they won't be taken into effect unless I log out and log back in, which is not feasible.</p>
  
  <pre><code>:: MouseSensitivity                     10
  :: MouseSpeed (Set Pointer Precision)   0
  :: MouseThreshold1                      0
  :: MouseThreshold2                      0
  
  @ECHO OFF
  
  REG ADD "HKEY_CURRENT_USER\Control Panel\Mouse" /v MouseSensitivity /t REG_SZ /d 10 /f
  REG ADD "HKEY_CURRENT_USER\Control Panel\Mouse" /v MouseSpeed /t REG_SZ /d 0 /f
  REG ADD "HKEY_CURRENT_USER\Control Panel\Mouse" /v MouseThreshold1 /t REG_SZ /d 0 /f
  REG ADD "HKEY_CURRENT_USER\Control Panel\Mouse" /v MouseThreshold2 /t REG_SZ /d 0 /f
  
  ECHO Execution logged on: %DATE% at %TIME% &gt;&gt; test.txt
  
  :: /* Tried this, doesn't work.
  :: RUNDLL32.EXE USER32.DLL, UpdatePerUserSystemParameters
  :: */
  
  @EXIT /B 0
  </code></pre>