fernandreu / office-ribbonx-editor

An overhauled fork of the original Custom UI Editor for Microsoft Office, built with WPF
MIT License
516 stars 100 forks source link

Temp file in use by another process when opening document #161

Open fernandreu opened 3 years ago

fernandreu commented 3 years ago

Hey Fernandreu,

Got a problem with the editor that i don't know how to solve. I have reinstalled, uninstalled, rebooted and still get the issue. It says that 'the process cannot access the file (sometmpname.tmp) because it is being used by another process.

Any ideas on how to solve this?

tmpError

Originally posted by @skorpio07 in https://github.com/fernandreu/office-ribbonx-editor/issues/125#issuecomment-845131879

fernandreu commented 3 years ago

Hi @skorpio07, could you check if this build fixes the issue? https://dev.azure.com/fernandreu-public/OfficeRibbonXEditor/_build/results?buildId=1028&view=artifacts&pathAsName=false&type=publishedArtifacts

Independently on whether that works or not, did something change in your machine recently? Like a Windows update, or another program getting updated, or maybe changes in your account or in the hardware. Just curious why the tool would suddenly stop working in a way I've not seen before.

skorpio07 commented 3 years ago

Hi, will try your solution to see if it works. as for my machine, nothing has changed recently that i am aware of. Even weirder is that it will work with Word files no problem. only seems to be an issue with Excel files, even if excel is not open and i just rebooted.

skorpio07 commented 3 years ago

so nope, still the file locking issue with excel files. should i open up a ticket with microsoft?

fernandreu commented 3 years ago

Nah, it should not be Excel's fault, and probably not Windows' either.

Just to give a bit more background: the tool creates a copy of your Office document in a temporary folder and keeps using that copy until you close / reload that document. This allows you to keep working with your document in the Office apps. But, for some reason, something else is getting on your way when trying to open that file that was just copied.

Interesting that the problem only occurs with network files (your comment here). My main guess due to that would be: do you have any security policies in that drive? I wonder if Windows is adding some protection which I did not take into account. Do you often see security prompts when opening documents from that drive? Such as "this file came from a network location and cannot be trusted".

I guess another thing to check is: does the issue also occur if you run the tool with admin rights?

skorpio07 commented 3 years ago

Sorry to take so long to get back in touch with you. Running as admin gave same results. No i don't get security notices as i whitelisted the network location. for now i am copying the files to my local drive to get around the issue. let me know what to try next.

On Fri, May 21, 2021 at 4:05 PM Fernando Andreu @.***> wrote:

Nah, it should not be Excel's fault, and probably not Windows' either.

Just to give a bit more background: the tool creates a copy of your Office document in a temporary folder and keeps using that copy until you close / reload that document. This allows you to keep working with your document in the Office apps. But, for some reason, something else is getting on your way when trying to open that file that was just copied.

Interesting that the problem only occurs with network files (your comment here https://github.com/fernandreu/office-ribbonx-editor/issues/125#issuecomment-846171301). My main guess due to that would be: do you have any security policies in that drive? I wonder if Windows is adding some protection which I did not take into account. Do you often see security prompts when opening documents from that drive? Such as "this file came from a network location and cannot be trusted".

I guess another thing to check is: does the issue also occur if you run the tool with admin rights?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fernandreu/office-ribbonx-editor/issues/161#issuecomment-846224255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIKEIJGDVNKJZ2KRE72PP3TO24IZANCNFSM45HOKESQ .