Trusted Location (1 Viewer)

Dairy Farmer

Registered User.
Local time
Today, 23:01
Joined
Sep 23, 2010
Messages
244
Set the app path as a trusted location in Package Solution Wizard when making your installer.

Code:
Additional Registry Keys

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

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

Or via VBA

Code:
Function TrustedLocation()

    Dim RegKey As String
    Dim RegObj
    Dim Value As String
    Dim WTRTL As Object
    
    
    RegKey = "HKCU\Software\Microsoft\Office\12.0\Access\Security\Trusted Locations\MyApp\Path"
    Value = "c:\MyApp"

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

End Function

Code:
Function TrustedLocationAllowSubFolders()

    Dim RegKey As String
    Dim RegObj
    Dim Value As String
    Dim TLAS As Object
    
    
    RegKey = "HKCU\Software\Microsoft\Office\12.0\Access\Security\Trusted Locations\MyApp\AllowSubFolders"
    Value = "1"

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

End Function
 
Last edited:

mdlueck

Sr. Application Developer
Local time
Today, 17:01
Joined
Jun 23, 2011
Messages
2,631
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:

Code:
Additional Registry Keys

Root = CU
Key = Software\Microsoft\Office\12.0\Access\Security\Trusted Locations\MyApp
Name = Path
[B][COLOR=Red]Value = c:\MyApp[/COLOR][/B]

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

ekayp

New member
Local time
Today, 14:01
Joined
Dec 14, 2011
Messages
9
Hi, I am assuming you add the above function(s) in a module within your application. How are they called if this is the case. What is a packaged solution?
I am having a problem with distributing a 2010 Access application to a user with a 2007 version and he seems to be encountering lot of problems trying to enable content as the application has quite a few Macros and some VBA code. Any ideas much appreciated.
Thanks in advance
 

Users who are viewing this thread

Top Bottom