Avast blocking auto-update macro (2 Viewers)

Kayleigh

Member
Local time
Today, 11:38
Joined
Sep 24, 2020
Messages
706
I'm encountering an issue with Avast antivirus blocking a macro that's intended to automatically update Microsoft Access to the master version. Despite adjusting settings, I haven't been successful in resolving this problem. Below is the code to run:

Code:
Option Compare Database
' global variable for path to original database location
Public g_strFilePath As String
' global variable for path to database to copy from
Public g_strCopyLocation As String


Public Sub UpdateFrontEnd()
Dim strCmdBatch As String
Dim notNotebook As Object
Dim FSys As Object
Dim TestFile As String
Dim strKillFile As String
Dim strReplFile As String
Dim strRestart As String

' sets the file name and location for the file to delete
strKillFile = g_strFilePath
' sets the file name and location for the file to copy
strReplFile = g_strCopyLocation & "\" & CurrentProject.Name
' sets the file name of the batch file to create
TestFile = CurrentProject.Path & "\UpdateDbFE.cmd"
' sets the restart file name
strRestart = """" & strKillFile & """"
' creates the batch file
Open TestFile For Output As #1
Print #1, "Echo Off"
Print #1, "ECHO Deleting old file"
Print #1, ""
Print #1, "ping 1.1.1.1 -n 1 -w 2000"
Print #1, ""
Print #1, "Del """ & strKillFile & """"
Print #1, ""
Print #1, "ECHO Copying new file"
Print #1, "Copy /Y """ & strReplFile & """ """ & strKillFile & """"
Print #1, ""
Print #1, "CLICK ANY KEY TO RESTART THE ACCESS PROGRAM"
Print #1, "START /I " & """MSAccess.exe"" " & strRestart
Close #1
'Exit Sub
' runs the batch file
Shell TestFile

'closes the current version and runs the batch file
DoCmd.Quit



End Sub

I've tried adjusting Avast settings to allow the macro to run but not been successful to date.

Any insights or suggestions on resolving this issue would be greatly appreciated. Thank you!
 

Kayleigh

Member
Local time
Today, 11:38
Joined
Sep 24, 2020
Messages
706
Just checking back in to see if anyone has any ideas on how to resolve the Avast blocking issue.

Any insights or suggestions would be much appreciated. Thanks!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:38
Joined
May 7, 2009
Messages
19,243
maybe add your batch file to Avast whitelist.
 

Kayleigh

Member
Local time
Today, 11:38
Joined
Sep 24, 2020
Messages
706
I would like to try that.

But I'm not sure how to?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:38
Joined
May 7, 2009
Messages
19,243
i have no avast, but certainly with every antivirus, you can Add Exception to any program/file that it does not include in scanning, etc.
 

Users who are viewing this thread

Top Bottom