Edit INI file with command line variables
Posted: Mon May 17, 2021 4:58 am
I've been trying all the morning to edit an INI file based on command line variables, without success...
May I request a bit of help with this ?
First, this is the command line I execute from PowerShell :
.\Diane.exe USERNAME=someUsername DATABASE=someDB SERVER=someServer DRIVERID=someDriver
this is how I declare my variables in the script :
and this is what I do at the end of the script :
Installation performs without any error, but in the end, my .ini file is not updated with any of the variable values, as you can see in this screenshot...
Any help with this would be greatly appreciated.
This is mandatory for our company to buy an InstallAware license.
Thanks.
PS: is it possible to "create" a section in the INI file ?
I mean, what if "DianeDB" does not exist in the INI file ? will it be created if I try to write a key to this section ?
May I request a bit of help with this ?
First, this is the command line I execute from PowerShell :
.\Diane.exe USERNAME=someUsername DATABASE=someDB SERVER=someServer DRIVERID=someDriver
this is how I declare my variables in the script :
and this is what I do at the end of the script :
Installation performs without any error, but in the end, my .ini file is not updated with any of the variable values, as you can see in this screenshot...
Any help with this would be greatly appreciated.
This is mandatory for our company to buy an InstallAware license.
Thanks.
PS: is it possible to "create" a section in the INI file ?
I mean, what if "DianeDB" does not exist in the INI file ? will it be created if I try to write a key to this section ?