Windows 10: MsSense.exe is locking a PDF file causing a C# application running File.Delete to hang...

Discus and support MsSense.exe is locking a PDF file causing a C# application running File.Delete to hang... in AntiVirus, Firewalls and System Security to solve the problem; We have a C# application which is calling File.Delete to delete a file in the user's %localappdata% folder. The application is occasionally hanging... Discussion in 'AntiVirus, Firewalls and System Security' started by Gav F, Dec 8, 2022.

  1. Gav F Win User

    MsSense.exe is locking a PDF file causing a C# application running File.Delete to hang...


    We have a C# application which is calling File.Delete to delete a file in the user's %localappdata% folder. The application is occasionally hanging indefinitely on that line of code when deleting PDF files.Using Handle by Microsoft, it shows that both the application and MsSense.exe have a RWD handle on that file.File.Delete should throw an exception if the specified file is in use but it should never hang indefinitely.Here is the snippet of code from the application:try { // Log entry which appears File.DeletefileName; // Log entry which does not appear} catch

    :)
     
    Gav F, Dec 8, 2022
    #1
  2. zephyrus Win User

    some .exe files hang


    In the last 48 hours, some .exe files do not execute. If started from explorer, explorer hangs. No error messages. These files run on another Win 10 machine. Nothing obvious in the event viewer. I note that *.exe file cannot be deleted when the system is in this state. I must reboot to regain access to the .exe file. sfc /scannnow shows no errors.

    Any suggestions?
     
    zephyrus, Dec 8, 2022
    #2
  3. Print to PDF causes my main application to hang

    Hello,

    I realize that your computer hangs while trying to print PDF. I want to know few more things to understand the issue.


    • Are you trying to print from browser or from any other application?

    • What application are you using to view pdf files?

    In the mean time I would suggest to re-install the pdf application.

    Hope this information is helpful. Please do let us know if you need further assistance with Windows, we’ll be glad to assist you.

    Thanks and Regards

    Sarandeep S - Microsoft Support.
     
    Singh Sarandeep, Dec 8, 2022
    #3
  4. MsSense.exe is locking a PDF file causing a C# application running File.Delete to hang...

    Not running new .exe or .msi files

    thank you, TO for your suggestions, but these didn't help unfortunately.

    "winmgmt /verifyrepository" came back as consistent and the Catroot2 has been moved to Catroot2.old, restarted and still the same problem.
    what else could I try please?

    regards
    D

    - - - Updated - - -

    Just a bit more info about what I noticed....

    - I can run .exe files as long as these are part of installed applications, like Word, Excel and other applications that have been installed for a long time. Could it be that if I move the .exe files to the folder where the other installed .exe are these would also run? I will try that.

    - - - Updated - - -

    OK..... so, just tried this...

    went into C:\Program Files (x86)\Audacity and double clicked on "audacity.exe" without any hesitations this applications started.
    I pasted another, just downloaded, application (.exe) into that same Audacity folder and it certainly didn't do anything after double clicking on it. It's like there has been a white list created with all application names that were installed up to a certain date/time and anything that isn't part of that list cannot be run (should be ignored)???? Does this even exist and if this is a possibility how could I figure it out? IT management says that they have certainly not installed anything like that.
     
    Devizes2008, Dec 8, 2022
    #4
Thema:

MsSense.exe is locking a PDF file causing a C# application running File.Delete to hang...

Loading...
  1. MsSense.exe is locking a PDF file causing a C# application running File.Delete to hang... - Similar Threads - MsSense exe locking

  2. Application/.exe files "save as"

    in Windows 10 Gaming
    Application/.exe files "save as": when i try to load exe files instead of executing they are asking me to save a file the 2 applications i have tried are discord and medalgame clipping software i have attached a screenshot below of what i encounter.The files that it creates are files with no extentionsas seen...
  3. Application/.exe files "save as"

    in Windows 10 Software and Apps
    Application/.exe files "save as": when i try to load exe files instead of executing they are asking me to save a file the 2 applications i have tried are discord and medalgame clipping software i have attached a screenshot below of what i encounter.The files that it creates are files with no extentionsas seen...
  4. Application install .exe files

    in Windows 10 Network and Sharing
    Application install .exe files: Stupid question.For years of using Windows now, every time I had to switch computers, either because I had to make a reset or because I purchased a new one, I always went online to look for my programs in order to download them again on the new system. Not only did I have to...
  5. Application install .exe files

    in Windows 10 Gaming
    Application install .exe files: Stupid question.For years of using Windows now, every time I had to switch computers, either because I had to make a reset or because I purchased a new one, I always went online to look for my programs in order to download them again on the new system. Not only did I have to...
  6. Application install .exe files

    in Windows 10 Software and Apps
    Application install .exe files: Stupid question.For years of using Windows now, every time I had to switch computers, either because I had to make a reset or because I purchased a new one, I always went online to look for my programs in order to download them again on the new system. Not only did I have to...
  7. .exe file deletion

    in Windows 10 Network and Sharing
    .exe file deletion: Hello I've been having troubles with .exe files I try to permantley delete the folder and it'll remove everything except the .exe file if I delete the .exe file with a shift+del it'll dissapear then repair once I refresh the folder it's in. If I use the normal delete method...
  8. No exe files will run!

    in Windows 10 BSOD Crashes and Debugging
    No exe files will run!: No exe files will run. This includes, Command Prompt, regedit, reset get started or anything else that has exe file during exicution. Using windows 10, on a hp envy laptop. *** Email address is removed for privacy ***...
  9. some .exe files hang

    in Windows 10 Support
    some .exe files hang: In the last 48 hours, some .exe files do not execute. If started from explorer, explorer hangs. No error messages. These files run on another Win 10 machine. Nothing obvious in the event viewer. I note that *.exe file cannot be deleted when the system is in this state. I must...
  10. 3 locked instances .exe but Unable to run .exe file

    in Windows 10 Support
    3 locked instances .exe but Unable to run .exe file: Hi everyone, I've got this serious problem recently. I can't run some .exe file. This problem happens a month ago, but now that file is able to run now, and now it got other .exe file can't run. Everytime I keep launch the .exe application file, the cursor just keep...