Skip to content

Instantly share code, notes, and snippets.

@u01jmg3
Last active March 16, 2018 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save u01jmg3/845edfc1842fa0b79920f407c3846fff to your computer and use it in GitHub Desktop.
Save u01jmg3/845edfc1842fa0b79920f407c3846fff to your computer and use it in GitHub Desktop.
Fix dictionaries (SourceTree bug)
@echo off
set regPath="HKEY_CURRENT_USER\Software\Microsoft\Spelling\Dictionaries"
set regName="_Global_"
set truncate=true
if "%truncate%"=="true" (
reg ADD %regPath% /t REG_MULTI_SZ /v %regName% /d "C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Office\16.0\be70806f\Proofing\RoamingCustom.dic" /f
) else (
for /f "tokens=2*" %%a in ('REG QUERY %regPath% /v %regName%') do set "regData=%%~b"
reg ADD %regPath% /t REG_MULTI_SZ /v %regName% /d "%regData%" /f
)
@u01jmg3
Copy link
Author

u01jmg3 commented Mar 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment