I have found a partial solution. For copying I needed to use sysnative instead of system32, to avoid folder redirection.
Also with the help from this blog I have found how to properly set file association.
One more thing missing, how to set the HKCU reg key properly, because now cmtrace asks if it is default viewer every time it gets opened.
Thanks