You can call 'runas' via an API at code level that allows you to specify a password. There's quite a few tools out there that do it. I used to host mine on my website but it caused all those website classification systems to classify my domain as 'hacking tools' so I had to remove it. :(
RunAs.exe only allows you enter a password interactively. If you want to elevate with RunAs in a script and pre-specify the password[1], you can't do it.
--
[1] Yes, I know this is awful security, but sometimes you have no choice.