Hola Ernesto,
evaluate this (I tested on Windows 10 with Mathematica 10.4.1, but it should also work on Mac):
If[$OperatingSystem==="Windows",Quiet@Run["taskkill /im WolframCDFPlayer.exe /f"]];Function[cdfName,
CDFDeploy[cdfName,#,
Method -> "Standalone",WindowSize->{600,300}, "Target"->"CDFPlayer"
]&@DocumentNotebook[#,Saveable->False,Magnification->1.5]&@
DynamicModule[{tbd}
,
Column[{
Button["Set option to TrustByDefault -> True ",
SetOptions[$FrontEnd,"NotebookSecurityOptions"->{"TrustByDefault"->True,"UntrustedPath"->{}}];
tbd=True;,
Method -> "Queued"
],
Button["Set option to TrustByDefault -> False ",
SetOptions[$FrontEnd,"NotebookSecurityOptions"->{"TrustByDefault"->False}];
tbd=False;,
Method -> "Queued"
],TextCell@
Grid[{
{Style["Do not ask for Enable Dynamics: ","Text",ShowStringCharacters->False],Dynamic[tbd(*,UpdateInterval\[Rule]1*)],SpanFromLeft}}, Alignment->Left]
}],Initialization:>(tbd="TrustByDefault"/.(NotebookSecurityOptions/.Options[$FrontEnd,NotebookSecurityOptions]))];
If[$OperatingSystem==="Windows",
With[{cdfExe =
FileNames["WolframCDFPlayer.exe",FileNameJoin[{$TopDirectory//ParentDirectory//ParentDirectory, "Wolfram CDF Player"}],2]/.{cdf_String,___}:>cdf
},
ReadList["! start \"\" \"" <>cdfExe<>"\""<>" " <> cdfName,"String"]
],
SystemOpen@cdfName
]
]@"SetPlayerSecurityToTrustByDefault.cdf";
Then click "Enable Dynamics" in the CDF
Now click the first button
This will open
where you should click "Yes".
and this it.
You will never be asked about "Enable Dynamics" again when opening CDFs.
Rolf