Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2004
    Posts
    77

    Unanswered: Eliminate Warning Message

    When attempting to open a file via a button on a form I receive an error “Some files can contain viruses or otherwise be harmful to your computer...” – then must click OK to open file.

    My button is coded as:
    Application.FollowHyperlink "z:\plans\drawing\" + Me.PlanNo1"

    Does anyone know if there is there a way to eliminate this warning?
    Thanks,
    SKK

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I'm pretty sure there is and that it involves some registry editing.

    Policies and Associations come to mind...

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Associations]

    What the policies do is prohibit opening of specific file types and you can tell the system via the registry to ignore files of a specific type.

    I have a .REG file that will edit the registry to allow .BAT, .MDE, .MDB and .VBS files to open with no warning. Of course, the file you are opening would have a different extension?!

    Assuming Windows XP here btw ...
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Jan 2004
    Posts
    77
    StarTrekker-
    Yup it's XP (but also seeing on Win2K). I see on the net the explaination of tweaking the registry. I can do that but there are numerous people using this routine (it's our cardfile). I'll have to visit 20+ people. It sure would be better if I could resolve via Access code.

    What do you mean by your .REG file? Is this something that's installed on a users machine that would resolve this?

    Thanks,
    SKK
    Last edited by esskaykay; 07-16-08 at 10:01.

  4. #4
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    Go to Tools - Macro - Security and change it to Low. You can also avoid this by signing your code and using trusted publishers (I have not done this so I can't provide any details).

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Quote Originally Posted by esskaykay
    StarTrekker-
    Yup it's XP (but also seeing on Win2K). I see on the net the explaination of tweaking the registry. I can do that but there are numerous people using this routine (it's our cardfile). I'll have to visit 20+ people. It sure would be better if I could resolve via Access code.
    There are ways around that. If you have a login script, you can install it that way, or you could use VBA to execute the .REG file... there are ways around having to visit users

    Quote Originally Posted by esskaykay
    What do you mean by your .REG file? Is this something that's installed on a users machine that would resolve this?
    Well... not yet!

    I've attached it. You can put it on a network location and get users to double click on it, or open it some other way. Opening it modifies the registry to allow those file types to open without user confirmation.

    Right click and EDIT it to see / modify the content.

    DISCLAIMER! The attachment contains a .REG file, which, when opened, will modify
    the registry to allow the opening of VBS, MDB, MDE and BAT files without warning.
    Doing so will render the system vulnerable to attacks by malicious files of that type.
    Be vary wary of the source of such files before opening them!
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  6. #6
    Join Date
    Jan 2004
    Posts
    77
    Thank you very much for the REG file. I will play this a bit to familiarize myself with it. However, I think I found another solution - objshell.ShellExecute funtion.

    Again, thank you for your assistance,
    SKK

  7. #7
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Personally, I wouldn't go near a registry change. These prompts are there for a reason, you should remember that!

    They may add an extra click in to every file open; but I'd chose that over a virus any day of the week
    George
    Home | Blog

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I only ever use that REG file as a LAST RESORT.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  9. #9
    Join Date
    Jul 2008
    Posts
    4

    docmd.setwarnings false

    have you tried using "DoCmd.SetWarnings False" to turn the display of system messages off?

    just put this before your "application..." line.

    to turn back on afterwards, just use "True"...

    cheers,
    ReggieSter

  10. #10
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I believe the message is coming from Windows, not Access.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  11. #11
    Join Date
    Jan 2004
    Posts
    77
    Yes, I tried setting warnings off but still had the error. Looks like its and OS thing not Access.

    Thanks all...
    SKK

Posting Permissions

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