Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2009

    Unanswered: How to avoid security warning message

    I have an app that's generated as a 2003 code version (from Access 2007) and executes as a nightly batch job in a Access 2003 runtime environment.

    If I run it from my workstation (w/ Access installed), it works perfectly. If I run it on the server using the runtime module, I get a:

    "Security Warning:
    Opening <path to database>
    This file may not be safe if it contains code intended to harm your computer. Do you want to open this file of cancel the operation"
    w/ Cancel & Open buttons.

    This server sits inside two firewalls with extremely limited access. Is there a reasonable way to get around this message? It runs late at night and no one is logged on to see the message or respond to it.

    I tried using the Access trust option to declare the folder on the server as 'trusted' but I still get the warning.


  2. #2
    Join Date
    Oct 2009
    check out the SetWarnings method when in VB help and try that.....not sure if it will turn off that specific warning or not....

  3. #3
    Join Date
    Dec 2009
    Already have that turned off. Also have the folder where the app resides set to 'trusted'

  4. #4
    Join Date
    Dec 2004
    Madison, WI
    There were a couple of different ways I discovered dealing with this problem.

    One way is to write vb code that temporarily bypasses the trusted zone such as the following:

    (Note: below comments were copied from here:

    You have had it before: the “Open File – Security Warning”. Nice feature, but not very interesting during execution of scripts. However you may not want to turn it off.

    The simple solution in VBScript has been offered by MS themselve: the SEE_MASK_NOZONECHECKS environment variable. Change it at the start of your script and restore it at the end. Plain & simple!

    Sample code (same as the KB article):
    set oShell= CreateObject(“Wscript.Shell”)
    set oEnv = oShell.Environment(“PROCESS”)
    oShell****n “c:\ms04-038\WindowsXP-KB834707-x86-enu /quiet /passive /norestart”,0,True

    Note: the **** above = . r u n (spaced out so it doesn't put in **** again.)

    The Open File – Security Warning dialog box is displayed when you try to silently install a hotfix or an update by using a Visual Basic script in Windows XP Service Pack 2

    The other way is to create a trusted zone for the location of the mdb (local intranet security settings) which you said you tried. This worked for me by adding in the correct location of the mdb file.

    I can't say if the above 1st example will work for you (especially with 2 firewalls). I used the 2nd method above adding it as a trusted zone. I have not personally tested the script method - I only came across it while trying to get rid of the Open File Security Warning (note: you would most likely launch your mdb embedding opening the mdb within the vb script using the VB example above.)

    Now if the warning you're getting refers to MACRO security within the mdb (once the mdb is launched), that's different and is fixed within MSAccess itself by changing the Macro security level under MSAccess Tools/Options.

    Hopefully it helps in some way.
    Last edited by pkstormy; 12-03-09 at 23:51.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts