aaronmrosenberg
Posts: 3
Joined: Fri Jan 13, 2006 12:06 am

Custom copying of files based on user option selection?

Hi,

I have an application that has several different custom, offline databases depending on the type of user. I would ideally like to have these users select 1 of 6 options -- identifying themselves -- during the installation sequence that would then inform the installer on which offline database file (Access mdb) to retrieve and copy. The mode of user identification needs to be radio button, menu or just something simple. (Anything requiring typing is too much for these users, so InputBox is out...)

It seems that the above dialog might be possible with a javascript custom action, but I can't quite figure it out. I've purchased the license and have an installer nearly ready, just cannot figure this important step in the installation requirements. Any ideas or suggestions are much appreciated!

Thanks, Aaron :roll:
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

I am afraid that, for the moment, the solution would be to use the InputBox. In a future release, Advanced Installer will support full UI customization and you will be able to define your own custom dialogs.

JavaScript/VBScript/WSH do not offer any GUI objects. There are Hypertext Applications (HTML files that contains VBScript code, saved with an ".hta" extension) but these are not supported as Custom Actions in Windows Installer.

Your second option would be to write a Custom Action DLL that displays the dialog and sets a property based on the user selection. However, this is a fairly complex task.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
aaronmrosenberg
Posts: 3
Joined: Fri Jan 13, 2006 12:06 am

Denis,

thanks for your help here. Any additional direction would be much appreciated as using the InputBox would (in this specific case) just be unacceptable solution for the end-users. I'm fairly comfortable with VB/C++ so I might be interested in the custom action DLL option. Where might I start? Are there any samples available? That might help to get me started.

Thanks, Aaron
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

I would suggest using C++, because VB programs requires the runtime DLLs in order to run.

You can find a sample Custom Action DLL (that performs serial validation) at:
http://www.advancedinstaller.com/user-g ... n-dll.html

Another MSI Custom Action DLL is provided on Code Project at:
http://codeproject.com/tips/msicustomaction.asp

I would also suggest using ATL/WTL instead of MFC for building the UI. The following links may be of interest to you:

WTL: http://codeproject.com/wtl/

ATL: http://codeproject.com/atl/

MFC: http://codeproject.com/buttonctrl/

Hope this helps.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
aaronmrosenberg
Posts: 3
Joined: Fri Jan 13, 2006 12:06 am

Denis,

am I correct that I'll have to work with Orca and the like to implement the intermediate dialogs? Or can I launch the dialogs via custom actions? The serial validation dll appears to have a convenient, dedicated dialog supporting its functionality.

Any other examples you might have would be fantastic. Those two have got me on board, now its just a question of seeing something in action.

Thanks again! -Aaron
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi Aaron,

If you use a custom action DLL there is no need for any editing with Orca, as the custom dialogs will be displayed by your application. If you are accustomed to UI applications I would suggest using this approach.

The approach used by Advanced Installer for the serial validation dialog is more complicated as it needed to be more general. In this case there exists a dialog created in the MSI package, the uses the DLL only to perform the *validation*. This only the validation method can be changed without the user having to care about the dialog.

But in your case, having both the dialog and the actions managed by the custom action application is the simplest solution.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”