none
Access freezing when opening from batch file RRS feed

  • Question

  • Hello Everyone,

    I can't seem to find any posting related to this issue I am having.

    I have a batch file that opens an access database (long story as to why I need to open from batch) however when the access database opens it just freezes. The weird part is that if I open the database manually it runs completely normal. I've tried it with more than one database and always get the same problem, if it opens from batch it freezes if I open manually it works fine.

    I have tried uninstalling and re-installing office, but that hasn't helped.

    Thanks in advance

    Friday, January 12, 2018 3:27 PM

Answers

  • I was able to find the problem, in case anyone runs into the same problem. Here is what it was.

    Avast(Antivirus) was causing the issue it was blocking the database because it thought the batch was a virus;

    it thought it was a virus named IDP.ALEXA.51

    Somehow it never warned me that it was being blocked, anyway I set it to ignore this threat and now everything is working correctly.


    Friday, January 12, 2018 9:05 PM

All replies

  • Please show us your batch commands.

    If this post answered or helped you find the answer to your question, please mark it as such for other Forum users knowledge.


    • Edited by DriveEV Friday, January 12, 2018 3:43 PM
    Friday, January 12, 2018 3:42 PM
  • @ echo off
    rem runPSS.bat


    rem start pss
    start "" "%UserProfile%\Desktop\MyDocuments\PSS\Database1.accdb"

    Friday, January 12, 2018 3:50 PM
  • As long as the batch file is being running from the interactive desktop session and not a service, task or non-interactive process (e.g. web app or service) then it should work fine.

    I would post your command line arguments as h2fcell suggested.


    Paul ~~~~ Microsoft MVP (Visual Basic)

    Friday, January 12, 2018 3:52 PM
  • start "" "C:\PPS\Database1.accdb"

    The above worked for me.  What is it that "runs completely normal"?  Are there any error messages?  If running VBA place some Msgbox statements in your code to see where it's hanging.


    If this post answered or helped you find the answer to your question, please mark it as such for other Forum users knowledge.


    • Edited by DriveEV Friday, January 12, 2018 4:01 PM
    Friday, January 12, 2018 4:01 PM
  • even if I do start "" "C:\PPS\Database1.accdb" I still get the same problem.

    What happens is that access opens but it hangs, I can't click on anything and have to kill it.

    However if I open the same database manually(not with batch) than it works normally (it doesn't hang)

    Friday, January 12, 2018 4:04 PM
  • How are you running the BAT file?  Command prompt, Task Scheduler, double clicking on BAT file in Windows Explorer?  Have you tried all?  What's the first thing your app is supposed to do when it opens?  Replace that with Msgbox "Hello".

    If this post answered or helped you find the answer to your question, please mark it as such for other Forum users knowledge.


    • Edited by DriveEV Friday, January 12, 2018 4:13 PM
    Friday, January 12, 2018 4:10 PM
  • Double clicking it

    this same batch file is running on other computers in my office and it is working good, it is just my computer that is having the problem and I can't figure out why.

    Friday, January 12, 2018 4:14 PM
  • Since the "batch file is running on other computers" and you "have tried uninstalling and re-installing office", I don't feel it's an MS Access issue.  If you're on a network, try signing onto another computer, with your network credentials,  and see if the batch will run.

    Have you tried right clicking on the BAT file and selecting "Run as administrator"?


    If this post answered or helped you find the answer to your question, please mark it as such for other Forum users knowledge.


    • Edited by DriveEV Friday, January 12, 2018 4:34 PM
    Friday, January 12, 2018 4:26 PM
  • Yeah I still do have the same problem even running as administrator.
    Friday, January 12, 2018 4:39 PM
  • My last suggestion is to check "Windows Task Manager" and ensure there are no MSACCESS.EXE Processes running before you click the BAT file.

    If this post answered or helped you find the answer to your question, please mark it as such for other Forum users knowledge.

    Friday, January 12, 2018 4:53 PM
  • Thank you for all your suggestions, and the time you took trying to help.

    Unfortunately, I made sure nothing is running in the background with task manager and I am still having the same problem.

    Friday, January 12, 2018 5:12 PM
  • Thank you for all your suggestions, and the time you took trying to help.

    Unfortunately, I made sure nothing is running in the background with task manager and I am still having the same problem.

    Does Microsoft Access display the Message Bar with a security alert?

    What happens if you open with an actual command line (without Start command) using the Access app:

    "C:\Program Files (x86)\...\MSACCESS.EXE" "C:\Users\username\Documents\My Database\Access\MyDatabase.accdb"


    Paul ~~~~ Microsoft MVP (Visual Basic)

    Friday, January 12, 2018 8:55 PM
  • I was able to find the problem, in case anyone runs into the same problem. Here is what it was.

    Avast(Antivirus) was causing the issue it was blocking the database because it thought the batch was a virus;

    it thought it was a virus named IDP.ALEXA.51

    Somehow it never warned me that it was being blocked, anyway I set it to ignore this threat and now everything is working correctly.


    Friday, January 12, 2018 9:05 PM