Update Edit Field with property set by FileBrowse dialog - installation

I have an Edit field that begin's empty. The user uses a button that launches the FileBrowse dialog and allows them to choose a file. This is all working, the file is stored into a property and the functionality is as intended.
However, the Edit Field is not being updated once the user chooses the file. Going forward then back a dialog shows the property in the field, but I can't ask the user to do this. I have read that this is an MSI limitation and was wondering if there are any ways around it.
Essentially I need to "refresh" the dialog, or at least the edit field control after the user chooses their file.
Thanks

This is indeed a limitation from Windows Installer. The only solution to overcome this from an MSI package is to use the twin dialog method.

Related

Dialog Box Using VB Script

Hello I have some knowledge about VB Script, but i need some help so that it will help me to move further and study in VB Script.
I want to make dialog box which will contain :
Two radio button
one Text field to enter some value
OK and CANCEL button
so, could you please help me out?
VBScript doesn't support custom dialogs. You can either use the Internet Explorer COM object to emulate a dialog, or create an HTA. Either way you're building a web page with a form.

MSI Installer and custom folders

I have an interesting problem. I created a MSI Installer for a .NET 3.5 Application. During the install process I ask the user for a custom folder name where application output files should be stored.
To solve this task I have added a "Textboxes A" user interface item. I assigned TextBox Edit1 a property.
This property I used in "Registry" view to store that path in the registry - that worked. But:
I also used this property in the "File System" view to specify the target folder.
The result is: registry is stored correctly. But the installer created always a directory which is named like the default value of the Textbox Edit1. I've changed that name to ensure that there is no place where I could get that value.
I seems that the property is not being updated by the installer UI although the registry value is set correctly.
Does anyone had the same or similar troubles and found a solution/workaround?
Thanks, Arthur
EDIT: If I change the order of the UI Items (Ask for custom folder first, then ask for the target folder) it works. But this is - what should I say - not a solution. It's a sad workaround.
EDIT: With Edit1 I mean the Edit Control 1 of the "TextBox View A" which is bound to the Property "DATAFOLDERPROPERTY".
A verbose MSI log should tell you more about what exactly is happening. There are two things that jump out at me. One is that your property, Edit1, is not a public property. For it to be public, all letters must be upper-case, e.g. EDIT1. The other is that you are trying to edit a folder location after CostFinalize has set directory locations. To update directories at this time, you cannot merely change their associated properties. You need to add a Set Directory custom action (type 35) to the sequence or a SetTargetPath control event to the dialog - I'd use the control event if possible.

How can I use standard WiX to create a streamlined installer experience?

Background:
Currently, we have created a wizard by WiX UI. The user should click next, next and next...
But suddenly, we found that there's nothing should be interacted with user, user just need keep clicking next. So..
Here is the desired behavior:
We automatically switch to the next dialog page after all the stuff (such as pre-check and so on) done in the current page. Once there are errors in installation process, we show the error page to the user. That makes for a streamlined installer experience for the user. One click, everything done.
Can WIX do this kind of stuff purely, or should I need some other work to do to implement this?
No, you'll need to define your own external UI handler (like the MS Office installer does) if you want something "fancy" - why not just remove the UI altogether? We do this for a number of setups....
Take a look at WixUI_Mondo, WixUI_Minimal and other predefined UIs that come with WiX. Otherwise you can define your own dialogs and their sequence.
You can try with Wix_minimal or you can go for your own customized dialog boxes.
You can also customize the sequences of the dialog boxes by your own need. I suggest you to do the second option.

Is it possible to replace the system open file dialog?

I want to replace the standard system open file dialog with the one I wrote, that means no matter within which programs you are opening a file, my dialog will be shown instead of the standard one, is this possible?
It seems that that there is no such API provided to accomplish this, is it possible to use some hooking technique, but this has to be reliable and not to be treated as spyware by anti-virus tools?
any other options?
If this is not possible, is it possible to add to the spacebar or toolbar in the standard open file dialog a button which invokes my dialog, which allow users select a file and in turn returns the path of the selected file to the "File name" input box of the standard dialog?
Any hits, links and code examples will be appreciated.
Starting in Vista, the FileOpen/FileSave dialogs are now "Common Item Dialogs" of which IFileOpenDialog & IFileSaveDialog are the two published implementations.
Since they're just COM objects with known CLSIDs you might get away with just replacing them by re-registering using their CLSIDs. Never tried something like that, might trip all sorts of alarm bells.
Pre-Vista file dialogs can be hooked in process, but I've never come across anything about global hooks or equivalent.
If you copy a file/folder to a dialog's filename field it usually pastes the full path anyway.
For example, if you have open both a program calling the standard open/save dialog box and also have a window open at the file or path that you want to work with (open from/save to), you can simply copy the file/folder from the explorer window, and then paste into the filename field of the dialog box, and it will insert the full path of the file/folder. No custom script is required!
Alternatively, for those programs that use custom dialog boxes where this step fails, copy the same file/folder in the window into the address bar of the same window (assuming it is visible). This will paste the full path, which you can copy again, and then paste this full path into the custom dialog box. I often use this when creating Office hyperlinks (Ctrl+K), because the Insert Hyperlink dialog does not work for the first method.
You can also use similar methods but paste into address bar fields and it works.

Install Shield 2009 - Shortcuts creation

Is it possible to create shortcuts in Install Shield 2009 based on user input?
In essnes, a shortcut will be created (on the desktop) only if the user (who runs the installation) wants to do so
We have a screen that prompts the user to create desktop and quicklaunch shortcuts.
The shortcuts are then each in individual components with a condition set to only install if the checkbox was selected.
You also should store this response in the registry somewhere, and read it back during a reconfigure, upgrade, repair, etc. Otherwise if the checkboxes were on by default and that screen does not display to the user, the condition will evaluate to true (because the default property is true) and although the shortcut was not initially installed, it will be created during the repair if the components condition is reevaluated.
I do something similar to Sacha, but I'm lazier. ;-)
I create a component for each desktop shortcut (I hate software that assumes it's allowed to dump shortcuts on my desktop); no file in the component. Then I assign each of these components to its own feature. Then I can use standard feature selection dialogs (which is built in automatically and used when the user selects a Custom installation) to let the user select the desktop shortcut features.
I don't see a lot of software installers offering to install optional shortcuts in the feature selection dialog, but it strikes me as a natural place to do it. More technical users may see this as mixing metaphors.
FWIW, I originally did this in an InstallScript/MSI project, and I've just done the exact same thing in a straight MSI project, and the technique works fine in both.
It's been a while since I've used installshield, my company is currently using WISE as an installer; however, it should be possible to do what you are asking.
In general installer terms you need to do the following:
Make a screen for your installer that presents the option to create the shortcut, this screen should have the prompt text and a checkbox.
There should be a mechanism for storing the response of the checkbox in an Installshield property.
During the execution phase, use the reponse to trigger the creation of the shortcut.
I don't know about the capabilities of Installshield 2009 for whether this can be done without editing the script itself.
I hope this helps.

Resources