You need to use the ExpandConstant
function when using values such as {src}
in code.
However, InitializeSetup
is also too early to run installation tasks. You should move this code into CurStepChanged(ssInstall)
.
Also, if it requires admin permissions it must be run with Exec
, not ExecAsOriginalUser
.