during installation, my installer has a dialog which asks for an URL and a port (stored in properties API_URL and API_PORT) and writes that info to a file "Application Folder/config/config.yaml", making use of the (rather cool) feature Text file update and the above properties. Example file content:
Code: Select all
api:
url: https://myurl.com
port: 4001
Idea 1) Check whether the config file already exists. If this is the case, skip the dialog asking for URL and port (and implicitly reuse the existing config file - maybe also show a dialog explaing this and pointing to the config file).
My problem with this approach is that I was not able to configure an according file search for some weird reason. My search looks like this:
File search: CONFIG_YAML (Name: config.yaml)
| Search location: Folder (Path: [APPDIR]\config)
For some reason, the config file is not found. The logfile contains the following, but I'm having a hard time intepreting it.
AppSearch: Eigenschaft: CONFIG_YAML, Signatur: FileSearchSign
MSI (c) (1C:4C) [15:33:28:762]: Note: 1: 1324 2: \config 3: 1
MSI (c) (1C:4C) [15:33:28:762]: Note: 1: 1324 2: \config 3: 1
Aktion beendet um 15:33:28: AppSearch. Rückgabewert 1.
Additionally, I have added an extra Text control to the dialog, with Property Name CONFIG_YAML and Default Value "unset". The text control always displays "unset".
What am I doing wrong?
Idea 2) The nicest solution would obviously be to parse the existing config.yaml file in case it exists, to prefill the dialogs URL and port text controls with the values found, and to just rewrite the config file. I have already tried to invoke the installer with arguments
Code: Select all
API_URL=https://myurl.com API_PORT=4001Thanks in advance,
Christian
FOLLOW US
Get the latest news in Application Packaging