Dialogs - How to tie controls together and also external?
Posted: Thu Jul 26, 2007 9:39 pm
Hey all,
After some minor familiarization projects, I've been working my way through our first major project using IA7, at this point mostly trying to update a product that previously used IS9. Most things have been straight-forward, but I'm running into some dialog problems.
We require the user to point to a license file during the installation (Yeah, I know, old school) - this gets validated against our license control and then allows the user to proceed in the install if it's valid. I'm running into two issues with this, and some forum searches and referencing the docs haven't been too enlightening.
Since I figure the overall scripting/checking is pretty elaborate, I'm doing this in two stages - in the first (for an upcoming beta) I just want to provide the ability for the user to browse to the license - since the product won't work too well if it's not there at the end. In the end, I'll want to actually validate it too, of course.
1) Dialog Control question - So, I've made a dialog that is using a PTShellTree, so that the user can browse to the location of their license file. I'm not actually validating it in any way against our license control, but I want to make sure they've actually selected a folder (and perhaps at least see if a file of the correct name is contained within). I know how to make the next button disabled based on whether a text box is empty or if a check box is unchecked from looking at other dialogs, but I have no idea what the property for 'selected item in the PTShellTree' is. Ideally, I want the user to have to select a folder, have that selected folder display in the text box underneath it, and only when text is being displayed, let the user click next. But there isn't anything that says which properties I need to be using for this (at least from connecting the PTShellTree to the text box, I can get the other half of that). The dialogs keep making a big deal of 'interactions between controls', so I'm figured there's SOME way to do this... (And no, I don't NEED to use the PTShellTree as the folder browser, but it seemed to be the most modern looking available).
2) At some point in the near-future, I'm going to need to add in the extra element of checking the license content against our license reader (so that once next is selected, it actually performs a bunch of checks before actually letting the user proceed to the next dialog). Ok, license reader included as support file, registered and accessed from there, check. And I've found and played around with the RunDLL function a little bit. The problem is, I need to be able to instantiate an object from that control (based on the provided license file) and call functions on that object to check for various properties and I don't see how I'm supposed to do that in the MSICode. In the past in various applications, I've done this particular operation in VBScript, InstallScript (badly), MSI Custom Actions calling into a C++ library. How should I be approaching this sort of thing for InstallAware?
Looking forward to your responses!
Update: Just had a thought on the second one at least - since I already have a C++ library that we were using for IS custom action definitions, perhaps I can include THAT library as a support file and use the RunDLL command directly on it (which ARE individual methods) and then let it handle all the object manipulation it needs to do. That would have the added benefit that it's all already written, of course (:->). Does that sound like the approach to take or is there a more direct method I haven't come across yet? (And i still need to know what to do about the dialogs)
After some minor familiarization projects, I've been working my way through our first major project using IA7, at this point mostly trying to update a product that previously used IS9. Most things have been straight-forward, but I'm running into some dialog problems.
We require the user to point to a license file during the installation (Yeah, I know, old school) - this gets validated against our license control and then allows the user to proceed in the install if it's valid. I'm running into two issues with this, and some forum searches and referencing the docs haven't been too enlightening.
Since I figure the overall scripting/checking is pretty elaborate, I'm doing this in two stages - in the first (for an upcoming beta) I just want to provide the ability for the user to browse to the license - since the product won't work too well if it's not there at the end. In the end, I'll want to actually validate it too, of course.
1) Dialog Control question - So, I've made a dialog that is using a PTShellTree, so that the user can browse to the location of their license file. I'm not actually validating it in any way against our license control, but I want to make sure they've actually selected a folder (and perhaps at least see if a file of the correct name is contained within). I know how to make the next button disabled based on whether a text box is empty or if a check box is unchecked from looking at other dialogs, but I have no idea what the property for 'selected item in the PTShellTree' is. Ideally, I want the user to have to select a folder, have that selected folder display in the text box underneath it, and only when text is being displayed, let the user click next. But there isn't anything that says which properties I need to be using for this (at least from connecting the PTShellTree to the text box, I can get the other half of that). The dialogs keep making a big deal of 'interactions between controls', so I'm figured there's SOME way to do this... (And no, I don't NEED to use the PTShellTree as the folder browser, but it seemed to be the most modern looking available).
2) At some point in the near-future, I'm going to need to add in the extra element of checking the license content against our license reader (so that once next is selected, it actually performs a bunch of checks before actually letting the user proceed to the next dialog). Ok, license reader included as support file, registered and accessed from there, check. And I've found and played around with the RunDLL function a little bit. The problem is, I need to be able to instantiate an object from that control (based on the provided license file) and call functions on that object to check for various properties and I don't see how I'm supposed to do that in the MSICode. In the past in various applications, I've done this particular operation in VBScript, InstallScript (badly), MSI Custom Actions calling into a C++ library. How should I be approaching this sort of thing for InstallAware?
Looking forward to your responses!
Update: Just had a thought on the second one at least - since I already have a C++ library that we were using for IS custom action definitions, perhaps I can include THAT library as a support file and use the RunDLL command directly on it (which ARE individual methods) and then let it handle all the object manipulation it needs to do. That would have the added benefit that it's all already written, of course (:->). Does that sound like the approach to take or is there a more direct method I haven't come across yet? (And i still need to know what to do about the dialogs)