As per Command Line Syntax (7zip.chm) > Contents > Command Line Version > Syntax :
7za <command> [<switch>...] <base_archive_name> [<arguments>...]
<arguments> ::= <switch> | <wildcard> | <filename> | <list_file>
<switch>::= <switch_symbol><switch_characters>[<option>]
<switch_symbol> ::= '/' | '-'
<list_file> ::= @{filename}
a is the command.
-pmy_password is a switch and should be therefore after the command and not at end. But switches can be also appended after base archive file name although this makes it more difficult to read and parse.
my_folder should be an argument, but is interpreted as base archive file name because you have not specified any archive file name.
So try:
7za.exe a -r -pmy_password MyArchive.zip my_folder