You shouldn't have had to run notepad as administrator, it is only notepad which has write permissions because of the avast self-defence module (other text editors only have read permission) and when you save it the self-defence module asks for confirmation.
So I don't know why you had to run notepad as administrator.