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
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