I made it simple and copied the functions into function exactly as directed and they do everything asked in v12 and win10. I call each function from the autoexec in order at app startup.
They work as advertised.