It’s enough to put semicolon before comment on the same line. In another words, semicolon before comment is supported by reg file on a line with registry entry as well as a full-line of comment.
References
- Minus sign to delete, semicolon to comment and IF/ENDIF mentioned here: MSDN: Registry File (Compact 2013) (Archived here.)