How to change a registry value with a variable in path?
-4
0
I'd like to change the value "vbawarnings" but the registry path has the word version in it (15.0 or 16.0 or something). So I don't know which word version is insalled on the 5000 computer in our company. I tried this but something went wrong with %%~fA @echo off setlocal set key=HKEY_CURRENT_USERSoftwareMicrosoftOffice for /f %%A in ('reg query "%key%"') do ( reg add "%key%%%~fAwordsecurity" /t REG_DWORD /v vbawarnings /d 1 /f ) Any Ideas? Thank you very much :)
windows microsoft-word windows-registry
share | improve this question
edited Nov 30 at 11:29