Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Custom Dialog Editors


3 replies to this topic

fjacquet

fjacquet
  • Members
  • 1 posts

Posted 07 June 2004 - 08:38

Hi all,
I a new programmer with IS Dev Studio 9, and I about to create a Basic MSI setup.
My Problem:
I've duplicated the dialog Destination Path, in order to allow users selecting a user-defined working folder.
I've created a "change" button"
when clicking on it, this open a new custom dialog that allows changing the path.
But Once I received an error 2343, Once the setup has blocked
Please can anyone explain me how to change get the value a a folder path into a variable used further in the setup sequence?

THanks

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 07 June 2004 - 09:09

I think calling the Windows API is easiest. Check out this project: http://www.installsi...m#FileBrowseMSI

You can adapt this project to browse for a folder instead of a file.
Regards
-Stein Åsmul

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 07 June 2004 - 23:22

I disagree with Glytzhkof in this case. You should be able to use a dialog similar to the destination path dialog to let the user select a folder. I'm not sure what you did wrong. Did you make sure that directory has a valid default location? MSI chels all directories before it displays the dialogs. So even if your users are giong to change the directory anyway, you have to initialize it to a valid value (like [INSTALLDIR]).
I would use the Database Folder dialog as starting point for the custom dialog.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 08 June 2004 - 01:57

I ended up using the Windows API because I encountered so many problems doing this in MSI. If there is a good, easy MSI way to do it a sample would be great. I seem to recall that I tried to add two path fields with two browse buttons to the same dialog, and that this failed violently. If you create a brand new dialog instead of trying to extend an existing one that is probably easier.

It is not problem free using the Windows API just so that is clear, specifically yuo run into refresh problems with the path dialog control on the dialog.
Regards
-Stein Åsmul