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 ?
Edit INI file with command line variables
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Edit INI file with command line variables
"Edit INI file" is a Windows Installer command (PURPLE COMMAND).
If your setup is based on Windows Installer Engine, PURPLE COMMANDS are not executed immediately but deferred to Apply Install execution.
https://www.installaware.com/forums/viewtopic.php?f=2&t=10848&p=41530
If you forcebly need to invoke your "Edit INI File" commands post Apply install execution, in your script simply include such commands within an IA Native Engine ON/OFF sequence.
For example:
https://www.installaware.com/forums/viewtopic.php?f=2&t=10499
If your setup is based on Windows Installer Engine, PURPLE COMMANDS are not executed immediately but deferred to Apply Install execution.
https://www.installaware.com/forums/viewtopic.php?f=2&t=10848&p=41530
If you forcebly need to invoke your "Edit INI File" commands post Apply install execution, in your script simply include such commands within an IA Native Engine ON/OFF sequence.
For example:
Code: Select all
Set Variable NATIVE_ENGINE to TRUE
Edit INI File ....
Edit INI File ....
Edit INI File ....
Set Variable NATIVE_ENGINE to FALSE
https://www.installaware.com/forums/viewtopic.php?f=2&t=10499
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: No registered users and 67 guests