AKAIK, if someone can open the db but doesn't have create permissions on the folder containing the db, they get to open it exclusively (at least in older versions - not sure if this applies to your version) because they cannot create the locking information file. You say it is a program that is locking you out. Is it identified in the message? If someone has terminated a process while the db was opened via automation, it should reset when they shut down or log off their computer. You could try going to the containing folder in Windows Explorer, right click on one of the column headers (such as Name) and choose Other from the context menu. Look in the list for "Owner" and choose it. It may identify who has, or last had the file open.
I don't know how to remotely access a db through automation and test for connections but I suppose that might be doable.