C
Culverin
Hi:
Outlook has a lock on the FRMCACHE.DAT file that it doesn't release until it
is closed. My script closes Outlook and then attempts to delete the
FRMCACHE.DAT file. Depending on how long Outlook takes to close, my script
can sometimes execute the delete line before the lock is released, generating
a runtime "permission denied" abend. Since Outlook can close at varying
speeds what I'd like to do is delay execution of the delete statement until
the lock is free.
Two solutions to this probelm come to mind.
1. Is there a way programatically to tell in VB Script if there is a lock
on a file? What is the syntax? I would think that testing the lock property
in aloop until it is freed would work.
2. Pausing execution for a fixed interval. Is there a VB Script "Pause",
"Delay" or "Break" statement for runtime? I've tried all of these and
nothing works.
Thanks for your help.
Outlook has a lock on the FRMCACHE.DAT file that it doesn't release until it
is closed. My script closes Outlook and then attempts to delete the
FRMCACHE.DAT file. Depending on how long Outlook takes to close, my script
can sometimes execute the delete line before the lock is released, generating
a runtime "permission denied" abend. Since Outlook can close at varying
speeds what I'd like to do is delay execution of the delete statement until
the lock is free.
Two solutions to this probelm come to mind.
1. Is there a way programatically to tell in VB Script if there is a lock
on a file? What is the syntax? I would think that testing the lock property
in aloop until it is freed would work.
2. Pausing execution for a fixed interval. Is there a VB Script "Pause",
"Delay" or "Break" statement for runtime? I've tried all of these and
nothing works.
Thanks for your help.