Just upgraded VirtualBox to version 5.1.12 on 64-bit Windows 10 Anniversary Edition, and tried to install the accompanying Extension Pack. I have been unable to install the Extension Pack using either the GUI or CLI interfaces, even in Safe Mode, I get the following messages:
C:\Users\J1008060>cd "\Program Files\Oracle\VirtualBox"
C:\Program Files\Oracle\VirtualBox>vboxmanage extpack install C:\users\j1008060\Downloads\Oracle_VM_VirtualBox_Extension_Pack-5.1.12-112440.vbox-extpack
0%...
Progress state: E_FAIL
VBoxManage.exe: error: Failed to install "C:\users\j1008060\Downloads\Oracle_VM_VirtualBox_Extension_Pack-5.1.12-112440.vbox-extpack"
VBoxManage.exe: error: The installer failed with exit code 1: VBoxExtPackHelperApp.exe: error: Failed to rename the temporary directory to the final one: VERR_ACCESS_DENIED ('C:\Program Files\Oracle\VirtualBox\ExtensionPacks\Oracle_VM_VirtualBox_Extension_Pack-_-inst-14032' -> 'C:\Program Files\Oracle\VirtualBox\ExtensionPacks\Oracle_VM_VirtualBox_Extension_Pack')
VBoxManage.exe: error: rcExit=1
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ExtPackManagerWrap, interface IExtPackManager
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleExtPack(struct HandlerArg *)" at line 1158 of file VBoxManageMisc.cpp
C:\Program Files\Oracle\VirtualBox>
I tried uninstalling VirtualBox and reinstalling from a newly-downloaded installer from the Oracle website. Once again, the main application installed fine, but the extension pack did not.