CreateUser fails - how to rollback?

Got a problem you cannot solve? Try here.
Post Reply
Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

CreateUser fails - how to rollback?

Post 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
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: CreateUser fails - how to rollback?

Post 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
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
Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Re: CreateUser fails - how to rollback?

Post by Sheri_Steeves »

Francesco,


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

Thanks for the quick response.

Sheri
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: CreateUser fails - how to rollback?

Post by FrancescoT »

:D
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
Post Reply