I'm writing a batch script to launch a program for my Citrix environment and I'm running into some issues with a couple of reg keys I'm trying to set in the script.

essentially I'm launching an access database located on a remote server from a user specific folder, in the script I've set trusted locations for the files I'm opening and I'm trying to configure some outlook behavior for when a user tries to email content from within this database. The Reg Add commands for the trusted locations are completing as intended but the commands to set outlook behavior are showing access denied for standard users on those particular keys. Is there a way to give modify access to a specific Hive in HKCU within my script so the keys can be added by individual users. Below are the commands I'm configuring in my script.

reg add "HKCU\Software\Microsoft\Office\16.0\Access\Security\Trusted Locations" /v AllowNetworkLocations /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Office\16.0\Access\Security\Trusted Locations\Location18" /v Path /t REG_SZ /d "\\server\share\%username%\documents\directory" /f
reg add "HKCU\Software\Microsoft\Office\16.0\Access\Security\Trusted Locations\Location18" /v AllowSubfolders /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Policies\Microsoft\Office\16.0\outlook\autodiscover" /v zeroconfigexchange /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Policies\Microsoft\Office\16.0\outlook\ost" /v noost /t REG_DWORD /d 2 /f
reg add "HKCU\Software\Policies\Microsoft\Office\16.0\outlook\cached mode" /v enable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Policies\Microsoft\Office\16.0\outlook\cached mode" /v cachedexchangemode /t REG_DWORD /d 0 /f
  • HKCU is usually open to the user, can you validate the key security applied to them ? – yagmoth555 Oct 17 '18 at 17:22
  • You can use an unelevated powershell session to check the permissions on keys in HKCU Get-Acl -Path "HKCU:\Software\Microsoft\Office\16.0\Access\Security\Trusted Locations" | FL Can you verify that the current user is the owner and has "Allow FullControl" listed under Access? – sippybear Oct 18 '18 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.