I am using AdvancedInstaller Enterprise edition version 22.2.
In my project I am creating a windows service with a property [SP] for the service user password. The project also creates the user if it does not already exist using the same [SP].
I read the value for [SP] from the Windows Credential Manager using a custom action inline powershell script.
Code: Select all
# get the WCM entry for the service user
$wcmServiceUser = Get-StoredCredential -Target "service_user"
# set the installer proprties
AI_SetMsiProperty SP $wcmServiceUser.GetNetworkCredential().Password
$propValue = AI_GetMsiProperty SP
Write-Output $propValue
In the installer log, and when I run the script in AdvancedInstaller, I see script is execute properly and setting the correct value for SP
The default value for the property SP is a single double quote ("). If I set the default value to @PlanDataService2023, the creation works fine.Return code: 0
Script output: "@PlanDataService2023"
Modified properties:
SP changed value to "@PlanDataService2023"
I verified I can manually create the user with the specified password.
I have attached my advancedInstaller project and the installer log.
Any input on how I can get this to work would be appreciated.
Thank you