rbfen
Posts: 10
Joined: Fri Feb 04, 2011 4:55 pm

Create User as a Pre-Requisite

Hi there, im having some trouble trying to organize my project and would be happy if someone could point me in the right direction.

I need to be able to create the Users/Groups during the pre-requisite stage or before, since one of the Pre-Requisite applications for my main install requires a certain account to exist before it proceeds. Is there any way to do this with the application, or will I have to create an exe wrapped script to run as a pre-requisite?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Create User as a Pre-Requisite

Hello and welcome to the Advanced Installer Forums,

You can try to mark your prerequisite as feature-based also enabling the "Chain prerequisite installation after main package" option.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rbfen
Posts: 10
Joined: Fri Feb 04, 2011 4:55 pm

Re: Create User as a Pre-Requisite

Thanks Mihai, I had used that option but it ends up causing me further issues. I am Installing SQL Server 2008 R2 as a pre-requisite, which uses a specific account for its access. So I need to create the account first, then install SQL server. I then have the main package creating a database and running SQL scripts to configure users/logins. However if I chain the pre-req after the main package, then these steps will fail. Is there any way to re-arrange when certain activites occur during the main package install? Such as IIS settings, SQL Scripts, etc?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Create User as a Pre-Requisite

Hello,

Creating a user in an install package will not assure that user will be available for other operations within the same package. By setting the options from my last post the prerequisite would have been chained after the main package which created the user.
Another solution would be to have the SQL Server as a global prerequisite in the main package that runs the SQL Scripts. Create a separate package that installs the user and simply add this package as a prerequisite scheduled before the SQL Server prerequisite. You can also mark the SQL Server prerequisite as the "Parent Prerequisite" of the user prerequisite. This way the SQL Server won't be installed unless the user is installed first.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”