Thread overview
How to terminate a file in use?
Dec 24, 2005
a.c.edwards
Dec 24, 2005
Manfred Nowak
Dec 25, 2005
a.c.edwards
Dec 25, 2005
Manfred Nowak
Dec 26, 2005
a.c.edwards
[OT]Re: How to terminate a file in use?
Dec 26, 2005
Manfred Nowak
Dec 26, 2005
a.c.edwards
Re: [OT]How to terminate a file in use?
Dec 26, 2005
Manfred Nowak
Dec 27, 2005
Manfred Nowak
December 24, 2005
Gentlemen,
I'm wondering if you can point me in the right direction. Need to know how to
check if a file is in use and forcedly terminate it.

Thanks,
Andrew


December 24, 2005
a.c.edwards wrote:

> I'm wondering if you can point me in the right direction.

At this time of the year there is only one direction to follow, which
is pointed out here:
http://www.griffithobs.org/StarofBethlehem.html

On this way you may want to pause at http://www.mstsoftware.com/c_mst_IsUsedBy_d.aspx

But there might not be any possibility to terminate christianity or the files used by them.

-manfred
December 25, 2005
Thanks, Manfred. Unfortunately though, the proxy server was being a prick and flat out denied my request to stop at:

http://www.mstsoftware.com/c_mst_IsUsedBy_d.aspx

In article <Xns9736CB8E03E59svv1999hotmailcom@63.105.9.61>, Manfred Nowak says...
>
>a.c.edwards wrote:
>
>> I'm wondering if you can point me in the right direction.
>
>At this time of the year there is only one direction to follow, which
>is pointed out here:
>http://www.griffithobs.org/StarofBethlehem.html
>
>On this way you may want to pause at http://www.mstsoftware.com/c_mst_IsUsedBy_d.aspx
>
>But there might not be any possibility to terminate christianity or the files used by them.
>
>-manfred


December 25, 2005
a.c.edwards wrote:

> Thanks, Manfred. Unfortunately though, the proxy server was being a prick and flat out denied my request to stop at:

I am quite sure the the great being, who controls all of us at this time of the year, will soon forgive all pricks what they are doing to you now.

Meanwhile simple try one of the 10,000 hits your favorite internet search engine will give out on a request for "mst isusedby".

Have some more nice days with your family.

-manfred
December 26, 2005
Once again, thank you very much. This is not exactly what I'm looking for though. I'm run a program that analyzes several reports and output the results to RTF documents that may or may not already exist. However, the program prematurely terminates if any of the preexisting documents are in use.

I'd like to check to see if the file is in use by a different process and then issue a close request to that process. I'm sure it is possible just not sure what the exact API function call is. Closest thing I can find in windows.d is FileClose() but it doesn't exactly foot the bill.

Andrew

In article <Xns9737C6011EE63svv1999hotmailcom@63.105.9.61>, Manfred Nowak says...
>
>a.c.edwards wrote:
>
>> Thanks, Manfred. Unfortunately though, the proxy server was being a prick and flat out denied my request to stop at:
>
>I am quite sure the the great being, who controls all of us at this time of the year, will soon forgive all pricks what they are doing to you now.
>
>Meanwhile simple try one of the 10,000 hits your favorite internet search engine will give out on a request for "mst isusedby".
>
>Have some more nice days with your family.
>
>-manfred


December 26, 2005
a.c.edwards wrote:

[...]
> I'd like to check to see if the file is in use by a different process and then issue a close request to that process.
[...]

I believe, that this is not possible in general and especially for Windows. Otherwise Windows would give some hint for users who want to delete a file in use, which is the main focus of "mst isusedby" and especially would never request restarts, because files are in use during an installation.

If you try out "mst isusedby" you will find, that it needs a long time to mostly not displaying some usable for your request.

I am quite sure that once you have found out the reasons for that behaviour, which is surely best done through a microsoft news group or one of your two free technical support tickets you will be able to solve this problem on your own using your aparently good knowledge of D.

I thank you in advance for then pointing me to the answer you have found for this known mysterium.

Again I wish you some nice days with your family.

-manfred
December 26, 2005
In article <Xns97386EBF4B3A8svv1999hotmailcom@63.105.9.61>, Manfred Nowak says...
>
>a.c.edwards wrote:
>
>[...]
>> I'd like to check to see if the file is in use by a different process and then issue a close request to that process.
>[...]
>
>I believe, that this is not possible in general and especially for Windows. Otherwise Windows would give some hint for users who want to delete a file in use, which is the main focus of "mst isusedby" and especially would never request restarts, because files are in use during an installation.
>
>If you try out "mst isusedby" you will find, that it needs a long time to mostly not displaying some usable for your request.
>
>I am quite sure that once you have found out the reasons for that behaviour, which is surely best done through a microsoft news group or one of your two free technical support tickets you will be able to solve this problem on your own using your aparently good knowledge of D.

I think you might have me mixed up with someone else. My programming ability is hapenstance in motion hence knowledge != skill. I will keep trying but my current location does not give my that flexibility to search the necessary forums.

>I thank you in advance for then pointing me to the answer you have found for this known mysterium.

Since I'm behind the Iron Curtain of proxy denial, this might have to be postponed until I return to the US but I will definately pass on what I find.

>Again I wish you some nice days with your family.
>
>-manfred


December 26, 2005
a.c.edwards wrote:

[...]
> Since I'm behind the Iron Curtain of proxy denial, this might have to be postponed until I return to the US but I will definately pass on what I find.

Thank you.

And one last idea on this problem: is it tolerable to do what Windows mostly does in such cases, i.e. switch to running your program at startup?

-manfred
December 27, 2005
Manfred Nowak wrote:

[...]
> I believe, that this is not possible in general and especially for Windows.

http://www.sysinternals.com/Utilities/Handle.html

has another tool for finding the processes that own a handle with the explicit "WARNING: Closing handles can cause application or system instability."

-manfred