I was just having the same issue I fixed it by going into my settings under the general tab and scrolling down until you get to an option to turn on run as administrator. Make sure this is on and that should fix the error. If not you might have to reinstall the whole curse client.
if it's a moving code 5 error -> look into the c:/minecraft/tmp directory or where you have minecraft installed, there's a file in the temp dir -> xxxxx.tmp -> rename it to -> MinecraftLauncher.exe -> and place it (copy/past) over de original c:/minecraft/MinecraftLauncher.exe this worked for me, goodluck
actually this error is a minecraft launcher error and yesterday i was updating through the launcher and it gave me that error i just closed it and ran it again it worked fine so for anyone that might have this try doing these:
1-running the curse launcher again but make sure its given admin rights
2-running minecraft launcher and make sure its admin too
3-if the problem persist try going to the location given in the error box yourself and move tmplauncher.tmp to where you installed minecraft and replace it with minecraft.exe and rename it the same (i am not sure of this step so make sure you have a backup of minecraft.exe before doing it)
I just recently reinstalled Minecraft and twitch, tried to run MC through twitch, and received this error. I went to try the solution of renaming the .tmp file, but found that the tmp folder is empty. I've changed my settings in twitch to run in administrator mode.
I seem to have figured it out. MC wasn't just in my program files, it was installed under my documents for some reason. I found the .tmp file in that location, renamed it, then copied it to the other tmp folder (the one that was in my program files), and didn't get the error anymore.