Page 2 of 3

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 13:30 UTC
by Dalai
I guess an anti-virus software could be interfering here.

Regards
Dalai

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 14:42 UTC
by Mr.Scully
white wrote: 2022-08-18, 13:03 UTC But when does it happen? Only if you double click the file in TC or right click the file in TC and choose Open with?
In both cases.
white wrote: 2022-08-18, 13:03 UTC Do you use Windows recycle bin? What happens if you use Shift+Del or disable recycle bin?
What happens if you enable "Use Explorer delete method"?
I always use Shift-Del but deleting with Del to recycle bin doesn't work either. Right click + Delete when in TC also doesn't work. Deleting in File Explorer does work.

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 14:44 UTC
by Mr.Scully
Dalai wrote: 2022-08-18, 13:30 UTC I guess an anti-virus software could be interfering here.
I don't use any antivirus protection (unless some is enabled by default). I can try to disable the default Windows protection (firewall etc.) but I don't think it's related.

This is a brand new Win 11 installation with just a couple of programs, I thought the issue would vanish but no, it's still there :-D

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 15:15 UTC
by Dalai
2Mr.Scully
Windows Defender is enabled by default. Like any such scanner, it can lock files while it scans them.

Regards
Dalai

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 15:47 UTC
by Horst.Epp
Dalai wrote: 2022-08-18, 15:15 UTC 2Mr.Scully
Windows Defender is enabled by default. Like any such scanner, it can lock files while it scans them.

Regards
Dalai
I have Defender running all the time and there is no problem deleting the sample file.

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 16:09 UTC
by Dalai
2Horst.Epp
Anti-virus software can be configured differently, it can have excludes and so on. And there's a "feature" called SmartScreen built into Defender that connects to MS servers to verify files.

I'm not saying it's because of Defender. It could also be caused by a shell extension.

Regards
Dalai

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 16:38 UTC
by white
Mr.Scully wrote: 2022-08-18, 14:42 UTC
white wrote: 2022-08-18, 13:03 UTC But when does it happen? Only if you double click the file in TC or right click the file in TC and choose Open with?
In both cases.
Is it possible to launch FastStone MaxView using a command line and pass the file to watch?
"C:\Program Files\FastStone MaxView\MaxView.exe" "c:\test\myfile.cr3"

If so, does the problem also appear when you view a file using a button?
Command: "C:\Program Files\FastStone MaxView\MaxView.exe"
Parameters: %P%N

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 18:37 UTC
by petermad
Do you use Windows recycle bin?
I don't - maybe that's why I don't have any problems.

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 20:26 UTC
by Mr.Scully
white wrote: 2022-08-18, 16:38 UTC Is it possible to launch FastStone MaxView using a command line and pass the file to watch?
"C:\Program Files\FastStone MaxView\MaxView.exe" "c:\test\myfile.cr3"
Opening the image via command line does not lock the file, TC can delete it afterwards.
If I run the app (FastStone MaxView) and open the file on my hard drive then it's not locked either.

Only if I open it "via" Total Commander (no matter what application I use to open it with) then TC can't delete it.

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 20:43 UTC
by white
Mr.Scully wrote: 2022-08-18, 20:26 UTC Opening the image via command line does not lock the file, TC can delete it afterwards.
What was the command line you used? Have you tried this on TC's command line or did you try with button in TC like I suggested?

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 20:48 UTC
by Mr.Scully
white wrote: 2022-08-18, 20:43 UTC
Mr.Scully wrote: 2022-08-18, 20:26 UTC Opening the image via command line does not lock the file, TC can delete it afterwards.
What was the command line you used? Have you tried this on TC's command line or did you try with button in TC like I suggested?
I think I ran the Windows "cmd" via TC's command line. I did not understand what you meant by viewing a file using button in TC?

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 20:55 UTC
by hi5
Perhaps try one of those "who locks/own this file" utilities to see which program/process is "locking" the file?

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 21:19 UTC
by Mr.Scully
hi5 wrote: 2022-08-18, 20:55 UTC Perhaps try one of those "who locks/own this file" utilities to see which program/process is "locking" the file?
Yes, that was the first advice that I got in this discussion. The file is locked by "dllhost.exe" which is probably causing the problem but that's a standard Windows process. I don't know what to do with that. If I open the image directly from the app (not via TC) then dllhost.exe does NOT lock it. The process that blocks it is somehow related to TC.

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 22:54 UTC
by nice
1. Process Exlorer -> dllhost.exe -> Command line -> /Processid: {GUID}
search in registry for {GUID}
in "default" field will be description of the process

2. Process Monitor -> record activity -> filter by filename

what to do with this? i don't know

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 23:30 UTC
by white
Mr.Scully wrote: 2022-08-18, 20:48 UTC
white wrote: 2022-08-18, 20:43 UTC
Mr.Scully wrote: 2022-08-18, 20:26 UTC Opening the image via command line does not lock the file, TC can delete it afterwards.
What was the command line you used? Have you tried this on TC's command line or did you try with button in TC like I suggested?
I think I ran the Windows "cmd" via TC's command line. I did not understand what you meant by viewing a file using button in TC?
The problem is probably associated with a shell extension, so I wanted to bypass the file association system by launching the viewing program directly and passing the .cr3 file as parameter. Basically to confirm/localize the problem. I know this cannot be done with Microsoft Photos (as far as I know), so I asked you if this is possible with FastStone MaxView (I am not familiar with FastStone MaxView).

I asked you for the command line you used. What I meant was the line you typed and executed. Note the difference between Command Line and Command Prompt (a command-line interface). I think you misunderstood and executed "cmd" and then started the .cr3 file. I wanted to know if you can start the maxview.exe program and pass the .cr3 file to view as argument. For example by typing in a command or by adding a button to TC's button bar and use that button. You said you aren't an IT novice, so I assumed you would understand.

Like you said dllhost is used to start applications or services. In task manager (Ctrl+Shift+Esc) you can view more details of the dllhost processes that are active. In task manager go to the Details tab, right-click a column header and choose "Select columns". Enable the column "Command line". Then check if the displayed list is sorted by Name, if not click on the Name column header. Then scroll to the entries with dllhost.exe in the Name column and examen what is displayed in the Command line column. If for example you open the context menu in TC (Shift+F10), you will see an extra row appearing in task manager.