Page 1 of 1

CreateUser fails - how to rollback?

Posted: Wed Nov 20, 2013 8:52 am
by Sheri_Steeves
Hello,

As part of my install I need to create a new local administrative user. This I have in place and after ApplyInstall is called, the call the CreateUser is made.

The problem is this -> if this call fails, i.e. the user cannot be created, I need to rollback the install.
This account must exist, and several services must be installed under this account for the product to work correctly.

Basically if I cannot create this account then I need to either a) terminate and rollback, or b) do this check during the dialog part of the install.
Can I call CreateUser before the ApplyInstall - preferably during the dialog process so I can prompt the user?

What is the best way to approach this?

Thanks,

Sheri

Re: CreateUser fails - how to rollback?

Posted: Wed Nov 20, 2013 11:29 am
by FrancescoT
Dear Sheri,

... I suggest you to use the "Create User" command before the effective package installation (... during setup interview).

It is not a Windows Installer command, so you can definitely use it before the Apply Install statement.

Regards

Re: CreateUser fails - how to rollback?

Posted: Wed Nov 20, 2013 11:51 am
by Sheri_Steeves
Francesco,


Perfect.... that's what I'll do then.

Thanks for the quick response.

Sheri

Re: CreateUser fails - how to rollback?

Posted: Thu Nov 21, 2013 11:30 am
by FrancescoT
:D