Eval user - initial questions - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

FergusMurray
Posts: 150
Joined: Thu Sep 30, 2010 10:44 am

Eval user - initial questions

Am evaluating AI, as we are moving away from Wise

We use the installers to create webservices on IIS
1. Is there a way to create a Webfolder during the install? - atm we install all our webservices into separate folders under http://localhost/OurProduct, is there a way to create that webfolder? there isnt an option I can see. "Files and Folders" view doesnt show the IIS base folder as an option

2. Is there a way to dynamically add files matching a pattern to the installs - we want to include all .aspx pages from a source folder and have them delivered to a dest folder, and if anyone adds new ones, they should be autoincluded during the build

3. webconfig substitution, we need to substitute entries in web.config during the install, looks like we might be able to do that with XML, whats the best way to handle that, we want the developers to be able to change or add entries to web.config, but during the install we want to change some of the entries under the applicationconfig

4. Username/password dialog - does it validate the username and password, i'm looking to use this for my app to define the anonymous user for the IIS webservice, but have the domain and user as separate properties makes this more of a challenge

5. Versions - we use SVN for version control, are the paths to the source stored as relative to the project file, so that I can copy my install project from the "trunk" to a "branch" without having to respecify all the paths?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Eval user - initial questions

Hi,
Is there a way to create a Webfolder during the install? - atm we install all our webservices into separate folders under http://localhost/OurProduct, is there a way to create that webfolder? there isnt an option I can see. "Files and Folders" view doesnt show the IIS base folder as an option
When creating a web site or a virtual directory in Advanced Installer, you are prompted for the disk location which will store its files (for example "Application Folder"). During install a webfolder is created automatically for this disk location. After install all sub-folders of the disk location should appear as child webfolders in IIS.

Please note that the disk location can be anywhere. You don't need to install in wwwroot. However, if you do want to install in the root folder you can try using the approach from this thread:
http://www.advancedinstaller.com/forums ... 48&p=17266
Is there a way to dynamically add files matching a pattern to the installs - we want to include all .aspx pages from a source folder and have them delivered to a dest folder, and if anyone adds new ones, they should be autoincluded during the build
Yes, in the "Files and Folders" page you can use folder synchronization for the folder which contains the files. You can specify synchronization filters which allow only .aspx files.
webconfig substitution, we need to substitute entries in web.config during the install, looks like we might be able to do that with XML, whats the best way to handle that, we want the developers to be able to change or add entries to web.config, but during the install we want to change some of the entries under the applicationconfig
You can import the webconfig file as an XML and use the XML editor to insert installer properties instead of hard-coded values. These properties can be set dynamically during install.
Username/password dialog - does it validate the username and password, i'm looking to use this for my app to define the anonymous user for the IIS webservice, but have the domain and user as separate properties makes this more of a challenge
You can use the "LogonInformationDlg" dialog in "Dialogs" page to get user information. To validate it you can create a Check If User Exists custom action.
Versions - we use SVN for version control, are the paths to the source stored as relative to the project file, so that I can copy my install project from the "trunk" to a "branch" without having to respecify all the paths?
By default all paths used by a project are relative. So if you maintain the files and folders structure, it doesn't matter where you move the project.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
FergusMurray
Posts: 150
Joined: Thu Sep 30, 2010 10:44 am

Re: Eval user - initial questions

Okay thanks for the response, this ticks a lot of the boxes we need

On the verification of the username, I've created my customaction and added it to the "Next" button, and I can see from the "Run with Log" option that its returning the correct result but it goes to the next dialog, but is there a way I can stop the installer proceding if the username is invalid?

I've tried adding another "Verify User" button to the dialog at making it set the AI_USER_VALID and set the "Conditional Controls" to enbale/disable on that, but it didnt seem to work

Am I missing something?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Eval user - initial questions

Hi,
is there a way I can stop the installer proceding if the username is invalid?
Yes, perhaps the Make sure an edit box is not empty how-to will help you. Instead of using an edit box property you can use an installer property set by your custom action. Please note that only Win32 DLL and VBScript custom actions can set installer properties.

If you use a "Check If User Exists" custom action you can condition the next dialog and the custom message with "AI_USER_EXISTS". This property is set by our predefined custom action. When creating your own custom action you need to set and use your own custom property.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
FergusMurray
Posts: 150
Joined: Thu Sep 30, 2010 10:44 am

Re: Eval user - initial questions

Okay I treid this:
Under the "Next" button of my login dialog, under the "Published Events"
Create a DoAction with the argument of my CustomAction "CheckIfUserExists"
Edit the NewDialog Event, and add the AI_USER_EXISTS=Yes to the condition

is this correct?

When i test the install it doesnt seem to get past the dialog now when i put a correct value in, is my approach correct?


I still need to get a variable with the combined DOMAIN\USER, since that is whats needed to set for the security on the IIS server, the IIS Server settings only allow one variable, so how do I go and create a combined one within the Login dialog?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Eval user - initial questions

Hi,

Yes, this is correct. If you want, you can also create a simple custom action which informs the user that the username is incorrect. This is also explained in the how-to I mentioned.
I still need to get a variable with the combined DOMAIN\USER, since that is whats needed to set for the security on the IIS server, the IIS Server settings only allow one variable, so how do I go and create a combined one within the Login dialog?
Simply use "DOMAIN_NAME" and "USER_NAME" properties from "LogonInformationDlg" dialog:

Code: Select all

[DOMAIN_NAME]\[USER_NAME]
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
FergusMurray
Posts: 150
Joined: Thu Sep 30, 2010 10:44 am

Re: Eval user - initial questions

I'd love to use
DOMAIN\USERNAME
but the Virtual Directory "Account used for anonymous access" - "property based user" setting only allows 1 property to be used, and doesn't allow you to type in the box
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Eval user - initial questions

Hi,

You can try using a custom property and use a Property set with Formatted custom action to set it to:

Code: Select all

[DOMAIN_NAME]\[USER_NAME]
Please note that references to properties must be enclosed in square brackets.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
FergusMurray
Posts: 150
Joined: Thu Sep 30, 2010 10:44 am

Re: Eval user - initial questions

Great, thanks cosmin, you've pointed me in the right direction

Return to “Common Problems”