I am preparing an InnoSetup installer and want to allow the user to pass parameters like testparam=abc along with the setup.exe. The value of testparam should be forwarded to the application exe.
Something like:
MySetup.exe /testparam=abc
I followed the instructions from Is it possible to accept custom command line parameters with Inno Setup and Custom command line parameter in Inno Setup with default value so I can pass build configuration but it still receive the error: Unrecognized [Setup] section directive at the line below in the [Setup] section.
this is a part of my iss file:
at the beginning:
> #DEFINE myparam ""
>
> [Setup]
> myparam = {param:testparam|Debug}
>
> [Run]
> Filename: {app}{#AppName}.exe; Flags: runhidden; Parameters:"/internalParam ""{myparam}""";
the /internalParam should receive the value myparam (in this case “abc”) and should be handled in the application.
I guess I am missing something and maype someone can point me to the right direction. Thank you.