Calling this from Module creates Windows Security to block it from running

Number11

Member
Local time
Today, 00:58
Joined
Jan 29, 2020
Messages
619
' runs the batch file
shell Test.cmd

This is now causing the operation to fail and windows security is blocking it from running.

is there another way to run a bat file from VBS/modules

1650367223125.png
 
Last edited:
what does test.cmd do?
show the code.

maybe it can be converted to FilesystemObject methods.
 
what does test.cmd do?
show the code.

maybe it can be converted to FilesystemObject methods.
it copies the same database and replaces the current one, so has to be done via cmd. seems anything that is called using "SHELL" is now being blocked by windows security
 
can yo use VBA.FileCopy?


/// be warned that you cannot Replace the running db (the one that has this code)
 
can yo use VBA.FileCopy?


/// be warned that you cannot Replace the running db (the one that has this code)
Yeah thats why i have to use the bat file to do that, any other way to call a bat file to run other than SHELL?
 
like i said, you Can't replace the running db with another
unless you close it first, run another db to do the copying.
when done copying, re-open the db.
 
Don't know if you can manage this, but consider using the Shell command on a file in a trusted location.
 
Yeah thats why i have to use the bat file to do that, any other way to call a bat file to run other than SHELL?
Have you tried FollowHyperlink? I don't know if it works for .exe or .bat files.
 

Users who are viewing this thread

Back
Top Bottom