I'm trying to create a shortcut based on the result of a Pascal function (which returns a path), but can't how to do it.
This is what I'm trying to do:
[Icons]
Name: '{userstartup}\Myprog'; Filename: MyFunctionThatReturnsPath() + 'Myprog.exe';
But the function is never called, instead the filename is treated as a simple string.
The
[Icons]
section entry should look like:And the corresponding function is:
The function must take a string argument, even if you do not actually make use of it. See Pascal Scripting: Scripted Constants: