RevitWorker.exe deletes files when Revit closes

RevitWorker.exe deletes files when Revit closes

Extraneous
Advisor Advisor
2,578 Views
14 Replies
Message 1 of 15

RevitWorker.exe deletes files when Revit closes

Extraneous
Advisor
Advisor

I ran into a very strange problem. When closing Revit, it deletes the user files - desktop, my documents, appdata folder, etc. It started unexpectedly, Revit worked for several months normally, I did not install anything or changed anything in Windows, but once Revit was closed and all files removes from the desktop.

 

If I do not close Revit, but kill process revit.exe through the taskmgr, then the files are not deleted.

It looks like an add-on is installed that deletes files on the OnShotdown event. But I delete all .addin-files and it didn't help.

Next I use ProcessMonitor and saw that process RevitWorker.exe is guilty! It really deletes my files! Is it a virus that infected the RevitWorker.exe? At first it arose on a office PC, but now here it is on my home PC! I do not store files on the desktop, but all program settings are deleted in the app. I'm just at a loss.revit delete files.png

Alexander Zuev
In BIM we trust
Facebook | Linkedin | Telegram

0 Likes
Accepted solutions (2)
2,579 Views
14 Replies
Replies (14)
Message 2 of 15

Lance.Coffey
Autodesk Support
Autodesk Support

Hello @Extraneous, thank you for the question!

 

Something weird seems to be happening with the RevitWorker process (I’ve never seen behavior like this before).

 

If you suspect a virus, it would be a good idea to run a scan of the system (including the RevitWorker process), if you have not already done so.

 

If there is something broken with the RevitWorker (which is not related to a virus), you may be able to fix this by rebuilding the EXE file:

  1. Rename the RevitWorker.exe (in C:\Program Files\Autodesk\Revit ####) to RevitWorker.old.
  2. Repair Revit.

The RevitWorker.exe file should be recreated.



Lance Coffey

Technical Support Specialist
0 Likes
Message 3 of 15

Extraneous
Advisor
Advisor

@Lance.Coffey thanks, now I tried your advice, unfortunately it not helps 😞

For viruses, of course, immediately checked too.

Extraneous_0-1587500591210.png

I noticed that if I kill RevitWorker process before closing the program, then everything is fine with the files.

Most interesting, not all files are deleted. Program shortcuts remain on the desktop, folders in the appdata, etc. - the system looks like the first time logged in with a new account.

Super-inexplicable behavior!. But it looks like the process somehow conflicts with the Windows accounts and resets to default.

I will reinstall Revit and watch the behavior.

 

 

 

Alexander Zuev
In BIM we trust
Facebook | Linkedin | Telegram

0 Likes
Message 4 of 15

Lance.Coffey
Autodesk Support
Autodesk Support

If cleanly uninstalling / reinstalling Revit (How to Complete a Clean Uninstall of Revit products) doesn’t clear it, another thing to test would be using a different Windows Account (see if the behavior is specific to the original account).



Lance Coffey

Technical Support Specialist
0 Likes
Message 5 of 15

Extraneous
Advisor
Advisor

I found a reason why files are been deleted. It happens when Revit contains "application-level" macros! 

Just a brain explosion! Why does RevitWorker delete files when there is a macros?

I have confirmed the problem with several users already, files are only deleted from users who have macros, and deleting macros solves the problem.

@Lance.Coffey please check it yourself:

  • start Revit 2020
  • create new application-level macros (not document-level!)
  • add simple code as like
    public void Start(){
       TaskDialog.Show("Message", this.ActiveUIDocument.Document.Title);
    {​
  • save document
  • close Revit
  • get ready to reinstall your windows account...

Alexander Zuev
In BIM we trust
Facebook | Linkedin | Telegram

0 Likes
Message 6 of 15

Anonymous
Not applicable

I confirm. I also have an application macro, after closing the revit, the files are deleted. If the application macros are removed, then everything is fine. win7 revit 2020

0 Likes
Message 7 of 15

Lance.Coffey
Autodesk Support
Autodesk Support

Thank you for the update @Extraneous,

 

I tried reproducing what you described with Revit 2020.2.2, and Windows 10 (1703 Creators update), and I’m not seeing the issue.

 

I’m not sure that I created the application macro the same as on your system (created the Module, then the macro, and added the line to the autogenerated code, but nothing happens when I try running it), I am attaching a TXT file containing the entire text from SharpDevelop application window. If this doesn’t match what you are using, could you reply with a copy of the text from your application?

 

Also, can you confirm that you have Revit updated (2020.2.2), and what operating system you are using?



Lance Coffey

Technical Support Specialist
0 Likes
Message 8 of 15

Extraneous
Advisor
Advisor

@Lance.Coffey Revit 2020.2 (20.2.12.1, 20200210_1400)

Yes, I confirm, Windows 10 doesn't have this problem, it's only with Windows 7.

Going to 10 is a solution, but still it seems to me that the situation is abnormal.

Alexander Zuev
In BIM we trust
Facebook | Linkedin | Telegram

0 Likes
Message 9 of 15

Lance.Coffey
Autodesk Support
Autodesk Support

@Extraneous Thank you for confirming the behavior is specific to Windows 7.

 

I’ve setup a Windows 7 machine for testing (currently installing Revit 2020) and will be trying to reproduce the behavior.



Lance Coffey

Technical Support Specialist
0 Likes
Message 10 of 15

Lance.Coffey
Autodesk Support
Autodesk Support

@Extraneous I've been able to reproduce this behavior, and have logged this with our developers for further investigation.



Lance Coffey

Technical Support Specialist
Message 11 of 15

Extraneous
Advisor
Advisor

It's good, thanks. I'll wait for a new information about this issue.

Alexander Zuev
In BIM we trust
Facebook | Linkedin | Telegram

0 Likes
Message 12 of 15

Lance.Coffey
Autodesk Support
Autodesk Support
Accepted solution

Hello @Extraneous, it is looking like this is related to the path length of the temporary files (when this gets too long Windows 7 is reverting to using the Application Data folder (%USERPROFILE%) instead of the normal temp (%TMP%) folder).

 

Can you test changing the location of your Temp folder to something shorter (like C:\Temp) and confirm if this clears the behavior?



Lance Coffey

Technical Support Specialist
0 Likes
Message 13 of 15

Extraneous
Advisor
Advisor

@Lance.Coffey yes it helps! I moved temp to "%systemdrive%\temp".

@Anonymous please check it youself too...

Extraneous_0-1598532585657.png

 

Alexander Zuev
In BIM we trust
Facebook | Linkedin | Telegram

0 Likes
Message 14 of 15

Lance.Coffey
Autodesk Support
Autodesk Support
Accepted solution

@Extraneous & @Anonymous there has been a fix released for this behavior in the Revit 2020.2.3 hotfix.



Lance Coffey

Technical Support Specialist
Message 15 of 15

jioXJ2DV
Explorer
Explorer

It just happened in my office to several colleagues some using Revit 2022/2023 in Windows 10 and some Windows 11. Maybe some of the Windows 10 updates have triggered this issue again

0 Likes