Greetings of the Day!
Actually, we have one requirement using the advanced installer executable. For that, I have created one executable using the advanced installer.
I have explained my requirement below.
I have to pass one parameter to my executable using the command line and create an ADMIN_SETTINGS environment variable with the value of the parameter that I have passed to it.
Which I have achieved till yet. To achieve this, I have created one MSI property and assigned that MSI property as a value to my environment variable.
but my actual requirement, which I have explained using use cases below,
Case 1: Command-line installation
1.1 Installation on a fresh machine (where the ADMIN_SETTINGS variable does not exist)
1.2 Installation on an old machine (where the ADMIN_SETTINGS variable already exists)While installing the executable using the command line, if we pass the ADMIN_SETTINGS parameter, then it should add the AKSHAY_ADMIN_SETTINGS system environment. : - Done
1.3 Installation without specifying ADMIN_SETTINGS parameterWhile installing the executable using the command line, if we pass the ADMIN_SETTINGS parameter, then it should update the new value of the AKSHAY_ADMIN_SETTINGS system environment (provided the new value and the old value are different, otherwise, it will keep them the same.
Case 3 : Command line/UI UninstallIt should not add, update, or remove this system environment variable.
Case 2 : UI installation means starting the executable from the Windows UI (without any options).
While installing the bootstrapper using UI, it should not add, update, or remove this system environment variable.
If the executable has set the environment variable during installation, it should be removed only if the value is unchanged from when it was set at installation.
If the value already existed prior to the installation, then it remains unchanged.
How to save MSI property value and use that value while uninstalling (which is required for case 3)
So, please help me out to resolve this problem.
If you give some references, it will be really helpful for me.
Thanks in advance,
Akshay