You can use rustdesk-1.1.9-x64-host=$wanipreg,key=$keyreg.exe to install rustdesk with the desired config.
It would make the toml creation part superfluous because this above "just works".
its the way I have chosen to do it, feel free to do it however you want, I want it all in the powershell script and this way it can be done automatically without renaming anything
You can use
rustdesk-1.1.9-x64-host=$wanipreg,key=$keyreg.exe
to install rustdesk with the desired config. It would make the toml creation part superfluous because this above "just works".