• tw-xxx-yyyy-zzzz .tmp files

    Home » Forums » AskWoody support » Windows » Windows 10 » Questions: Win10 » tw-xxx-yyyy-zzzz .tmp files

    Tags:

    Author
    Topic
    #2391614

    While searching for a file today, I discovered that I have nearly three thousand file folders with names like those in the title.  Please glance at the attached screen grab to see what I mean.

    tw- tmp files

    The newest one is from today, and the oldest one is from about 5 months ago.

    So I am wondering what they do, are they a symptom of something wrong, and can they be deleted?  If I try to delete just one, there is an error message as shown below.

    Annotation-2021-09-24-errormsg

    Any advice is much appreciated.

    • This topic was modified 3 years, 6 months ago by AlphaCharlie.
    • This topic was modified 3 years, 6 months ago by AlphaCharlie.
    • This topic was modified 3 years, 6 months ago by AlphaCharlie.
    Viewing 1 reply thread
    Author
    Replies
    • #2391622
      1 user thanked author for this post.
      • #2391638

        Thank you Alex, and yes I did read that thread on tenforums before I asked for help here.

        I have never used the antivirus programs that are mentioned there.  I only use Microsoft Windows Security and Spyware Blaster on this machine.

        I looked at
        <b>Task Scheduler => Microsoft\Windows\Management\Provisioning => Logon    </b>
        and on my machine it says that task completed successfully today.    The task runs “at log on of any user” which sounds important.  Since  I am not knowledgeable enough to know what it does, I am very hesitant  to disable it.

        Did you have the same problem that I described, and did one of the steps at the tenforums thread solve it for you?

        I fear that the big Powershell script near the end of that thread looks to be beyond my pay grade.  Let us  see if anyone else at askwoody can report on their experience.

        • #2391646

          Yes, I have 367 tw-.. files.
          I didn’t stop the task as the files don’t bother me at all.

          1 user thanked author for this post.
        • #2391687

          I disabled that task on my system back in May using the following powershell command (run as Admin.)

          Schtasks /Change /Disable /Tn "Microsoft\Windows\Management\Provisioning\Logon"

          I no longer get any tw-*.tmp folders and haven’t noticed any ill effects of the task being disabled.

          1 user thanked author for this post.
    • #2391889

      There’s two ways of dealing with these temporary files – 1) clean them up afterwards (which is what the VBS script (not PowerShell) posted on TenForums does or; 2)  just prevent them occurring in the first place.

      1:

      I used the VBS script at first then a PowerShell script written by @RetiredGeek here on AskWoody whilst I tested the effect on another device of just stopping the tw-* files from being created in the first place.

      RetiredGeek’s PowerShell script is really useful because you can create your own file patterns for deletion. As such, I recommend it for those who prefer  easy deletion *after* they are created. Note however that the AskWoody forum software has removed backslashes from RG’s post so the first line of the script needs fixing:

      Change:

      $TempPath = "C:WindowsTemp*.*"

      to

      $TempPath = "C:\Windows\Temp\*.*"

      2:

      After a year of testing and monitoring, I prefer the second method now, i.e. to not let the tw-* files be created in the first place. Another year on and I haven’t seen any adverse side-effects after disabling both the two scheduled ‘provisioning’ tasks – ‘Cellular’ and ‘Logon’. I haven’t seen a single tw-* temp file since.

      (Note that you really only need to disable the Logon task. If you’re a road warrior using a laptop with a built-in mobile adapter (e.g. LTE cellular) then you’ll probably need to disable the Cellular task as well.)

      Note also:

      Here’s a screenshot of the two ‘provisioning’ tasks on my daily driver laptop, both showing as Disabled (a):

      provisioning_logon

      Now look at (b)… yep, Microsoft just blithely ignored the Disabled setting and ran it anyway!

      A check of the time and date (using Nir Sofer’s FullEventLogView) shows an incredible amount of activity (168 events logged over a period of 6 seconds) at that time (until the Logon task’s timestamp is updated after another 11 seconds of null activity since the task ran). I’ve saved the 168 events – I can attach them as a CSV file if anyone is interested – but it looks like they are almost all connected to the Microsoft Store.

      Now that I’m happy that disabling the task(s) has no apparent side-effects, the next step is to delete the Logon task to prevent Microsoft running it anyway.

      Hope this helps…

      2 users thanked author for this post.
    Viewing 1 reply thread
    Reply To: tw-xxx-yyyy-zzzz .tmp files

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: