View Full Version : Trusted Location


Dairy Farmer
11-08-2011, 03:31 AM
Set the app path as a trusted location in Package Solution Wizard when making your installer.

Additional Registry Keys

Root = CU
Key = Software\Microsoft\Office\12.0\Access\Security\Tru sted Locations\MyApp
Name = Path
Value = c:MyApp

Root = CU
Key = Software\Microsoft\Office\12.0\Access\Security\Tru sted Locations\MyApp
Name = AllowSubfolders
Value = #00000001

Or via VBA

Function TrustedLocation()

Dim RegKey As String
Dim RegObj
Dim Value As String
Dim WTRTL As Object


RegKey = "HKCU\Software\Microsoft\Office\12.0\Access\Securit y\Trusted Locations\MyApp\Path"
Value = "c:\MyApp"

Set WTRTL = CreateObject("WScript.Shell")
WTRTL.RegWrite RegKey, Value, "REG_SZ"

End Function

Function TrustedLocationAllowSubFolders()

Dim RegKey As String
Dim RegObj
Dim Value As String
Dim TLAS As Object


RegKey = "HKCU\Software\Microsoft\Office\12.0\Access\Securit y\Trusted Locations\MyApp\AllowSubFolders"
Value = "1"

Set TLAS = CreateObject("WScript.Shell")
TLAS.RegWrite RegKey, Value, "REG_DWORD"

End Function

mdlueck
12-27-2011, 09:16 AM
Useful information, Dairy Farmer. Thank you for posting where these settings come from under the covers.

Your first example had one typo. Corrected in red font here:

Additional Registry Keys

Root = CU
Key = Software\Microsoft\Office\12.0\Access\Security\Tru sted Locations\MyApp
Name = Path
Value = c:\MyApp

Root = CU
Key = Software\Microsoft\Office\12.0\Access\Security\Tru sted Locations\MyApp
Name = AllowSubfolders
Value = #00000001