Hello Silvio,
I therefore would like to have a rollback step that removes that user. I noticed that there is no built-in option in the user creation page.
Indeed, you are right. We currently do not offer predefined support for this.
How can I achieve this? I guess through a custom action. A VBS script?
Yes, this can be achieved through a custom action that will undo the changes (e.g. delete the created user). The custom action can be of any type (e.g. VBScript, PowerShell, C#, etc.).
One thing to keep in mind here would be the fact that your custom action should have its execution time set to
"During installation rollback" and it should be scheduled, in the installation sequence, after the action that creates the user. The action that creates the user takes place between
"AllocateRegistrySpace" and
"ProcessComponents" standard actions (which are part of the
"Preparing" action group).
In order to display the above mentioned standard actions, please go to
"Custom Actions" page , right click on the
"Preparing" action group -->
"Show Standard Actions" -->
"Preparing" --> click on
"AllocateRegistrySpace".
Now please repeat the above step for the
"ProcessComponent" as well.
(Enterprise or above project type required): In order to schedule your custom actions between those, simply drag and drop it. In order to make sure that your custom action is executing "after" the action that creates the user, please go to
"Table Editor" page -->
"InstallExecuteSequence" table --> click on the
"Sequence" column (to order the actions by their sequence) --> look for the
"AI_ProcessAccounts" action. Make sure that your custom action has a higher sequence number that the one of the
"AI_ProcessAccounts" custom action.
Hope this helps.
Best regards,
Catalin
FOLLOW US
Get the latest news in Application Packaging