This exact error just happened to me after a Windows 10 update. Thanks to this post, I found the problem. TexGen is not being logged as a threat, but Windows is blocking it anyway. I fixed it by doing the following:
Windows Security > Virus & Threat Protection
Scroll down to Virus & threat protection settings, then click "manage settings"
Scroll down to Exclusions, then click "add or remove exclusions"
Click the button to add an exclusion, then choose "process"
Type "TexGenx64.exe" , then click add.
These are the steps I followed to allow TexGen to write files. Running it in admin and giving it the permission per user didn't fix anything, I had to go through Windows' junk.
z929669: PS: Those running a decent 3rd party AV will likely not have these issues. It's Windows OS native security that causes the issue most likely: