User browser dialog - 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!

davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

User browser dialog

Is there a dialog where a user name, domain and password can be entered and these are validated before the next dialog is shown?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: User browser dialog

Hi,

For this you can try using our Serial Validation page. Activating this option will automatically add the dialog required in the Dialogs page.

Please let me know if you have any questions.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Re: User browser dialog

Hello - enabling this option just adds a dialog for User Name, Organization and Serial Number

I was looking for entering Username, DomainName and password credentials that would be used for a Windows Service - is there a way to do this?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: User browser dialog

Hi,

For this you can try to create a custom dialog using the dialog editor.
After this you can try using Published Events to validate the data entered by the user.

Here is an article that could help you.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Re: User browser dialog

Hello,

This is a bit complicated - do you have any sample code?

I could probably write something in .NET to do this - but I see I can add .NET code to the InstallExecuteSequence but I dont seem to be able to for UI Custom Actions - should this be possible?


Thanks,


Dave
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: User browser dialog

Hi Dave,
This is a bit complicated - do you have any sample code?
Please note that the installer part doesn't require any code. You can use the dialog editor GUI to create a custom dialog which retrieves the information you need. The User Guide contains a dialog tutorial which may help you. After that, you can use the installer properties used by the custom controls any way you need.
I could probably write something in .NET to do this - but I see I can add .NET code to the InstallExecuteSequence but I dont seem to be able to for UI Custom Actions - should this be possible?
I'm afraid that .NET Installer Class actions cannot run as UI Custom Actions. However, you can try using a C++ DLL or VBScript.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Re: User browser dialog

Hi Cosmin,

I am happy creating the dialog and setting properties - for example I would add 3 EDIT fields USERNAME, DOMAINNAME, PASSWORD with the PASSWORD field's password property set to TRUE.

I'm not sure how to write C++ sorry and I'm not really keen on using VB Script to validate user passwords but that sounds like the only choice - how do I call a VBScript from within the UI and pass it the USERNAME, DOMAINNAME and PASSWORD property values? Once I've done this how does the VBScript pass back a return code (where its valid or not) back to the Installer?

Also is there any chance that there will be a User Credentials dialog not built in to Advanced Installer in future? It seems a really obvious thing to need? In my case I would need it for setting credentials on Windows Services / IIS Application Pools.


Thanks,


Dave
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: User browser dialog

Hello,
how do I call a VBScript from within the UI and pass it the USERNAME, DOMAINNAME and PASSWORD property values?
The Session.Property() function returns the value of the property. You could use it from within your script like this:

Code: Select all

username = Session.Property("USERNAME")
domainname = Session.Property("DOMAINNAME")
pass = Session.Property("PASSWORD")
To call your script from the UI you can use a DoAction Published Event

Your script can return one of the Return values listed on msdn in order to cancel the install.
To return a value from a vbscript, enclose your code in a function, then assign the return value to the function identifier:

Code: Select all

Function YourFunctionName()
  ' your code goes here

  ' now to return the value: replace 2 with the return value desired
  YourFunctionName = 2
End Function
Also is there any chance that there will be a User Credentials dialog not built in to Advanced Installer in future? It seems a really obvious thing to need? In my case I would need it for setting credentials on Windows Services / IIS Application Pools.
We have no way of knowing the exact functionality that particular predefined dialog would perform. The dialog would be too particular to include it as a predefined dialog

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Re: User browser dialog

I would suggest the same functionality that is in InstallShield

Adding the Ability to Create or Set an Existing User Account
InstallShield 2010

To add the LogonInformation template to a Basic MSI project:

In the View List under User Interface, click Dialogs.
In the Dialogs explorer, right-click All Dialogs, and click New Dialog. The New Dialog Wizard opens.
Complete each panel of the wizard. In the Dialog Template panel, select Logon Information Panel and Associated Child Dialogs.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: User browser dialog

Hi,

I added this improvement on our TODO list and it will be available in a future version. Thank you for your suggestion.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Re: User browser dialog

Excellent - thanks for that. In the mean time I dont suppose you could add a ValidateCredentials (UserName, DomainName, Password) function in your list of custom functions?

Or provide some C++ sample code for writing custom actions?

I'm happy writing C# custom actions but I dont understand C++ and wouldnt know where to start writing one (seeings you can't link .NET dlls from Custom UI actions)


Thanks,


Dave
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: User browser dialog

Hi Dave,
In the mean time I dont suppose you could add a ValidateCredentials (UserName, DomainName, Password) function in your list of custom functions?
A function for this will be added when the dialog will become available.
Or provide some C++ sample code for writing custom actions?
Perhaps this sample DLL custom action will help you.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”