In the Revit.ini file, settings in the [Macro] section correspond to settings on the Macros tab of the Options dialog.
Corresponds to the Application Macro Security Settings toggle.
Type = integer
Valid values: 0 = enable (default), 1 = disable
Corresponds to the Document Macro Security Settings toggle.
Type = integer
Valid values: 0 = ask before enabling document macros (default), 1 = disable, 2 = enable
[Macro] AppSecurity=1 UIDocSecurity=0
To run Revit with macros disabled and no user add-ons loaded, for example to know is traceable to a particular add-on or Core Revit, use the following setting in Revit.ini:
[API]
DisableUserAddinsAndMacros=1