I require to remove a share temporarily to keep users out of a database while it is compacted, repaired and copied. I send out the usual "please get out of the database" messages which are ignored and although we run a vbs script which is supposed to get users off of the database there are still connections to it. I wanted to stop users getting back into the database by removing the net share but the job hangs because net share sharename /delete returns a message Users have open files on the database, continuing will force them off. Do you want to continue. Y/N. The job then hangs waiting for a response. Can I automaticaly put a Y in to respond and if so how please? Many thanks. Iain.
PS the vb script which might not work is as follows, I know that this is not the forum for it but a pointer would be nice!
Dim cn
set cn = createobject("loggedusers.users")
cn.ShutDownCurrentUsers "d:\database\vetdb_2000.mdb", "PLEASE Save what you are working on and exit - About to ShutDown", 20
set cn = nothing
Many thnaks
PS the vb script which might not work is as follows, I know that this is not the forum for it but a pointer would be nice!
Dim cn
set cn = createobject("loggedusers.users")
cn.ShutDownCurrentUsers "d:\database\vetdb_2000.mdb", "PLEASE Save what you are working on and exit - About to ShutDown", 20
set cn = nothing
Many thnaks