I have a program built with WPF in C#. I used Inno Setup to build an installer for the program.
If I run my installer, I put in the ability to launch the program when finishing the installer. See below:
This works without issue. My application is launched and begins its startup process as expected.
However, under normal operation, a user would not install the program every time they want to run it. Instead, they would go into the start menu and type in the ApplicationName and run it. When I run the program this way, I get the following error:
Value canot be null.
Parameter name: section
I have tried starting from scratch by ensuring the program is not installed, running the installer, unchecking the box, and running the program from the start menu. The error persists. If, from here, I run the installer and leave the box checked, the program starts like normal.
I do have a portion in my Inno Setup file that provides command line args as seen here (with some components in all caps to hide actual data):
[Run]
Filename: "{app}\{#ExecutablePath}\{#MyAppExeName}"; \
Description: "Launch APPNAME"; \
Parameters: "APPNAME {userappdata}\{#MyAppName}\FOLDERNAME ARG"; \
Flags: runascurrentuser shellexec skipifsilent nowait postinstall
The only thing I can think of is that these only get passed in when the program is launched from the installer and not from the Start menu. However, as I understand the Parameters:
property, this is not the case.
I have only written installers for far more basic programs in the past. This program has a large number of projects and files associated with it along with requiring command line arguments. Is there anything obvious I am missing? I do not know what to try next as I cannot find instances of similar behavior online.