Click here to Skip to main content
Email Password   helpLost your password?

Introduction

The Add-In complements the VS 2008 around a new dialog Selection Feature for the management of Feature. The add-in checks the installer project whether a Selection Feature dialog exists. If the dialog exists, it changes the MSI-file as well as it is put in the Dialog-Property. The result becomes the Output-window. The new dialog SelectionFeature(VsdSelectionTreeDlg.wid) uses the functionality of the Installer-Control SelectionTree. The dialog becomes sketched for neutral, US-English and German, one more copy must be adapted with Orca for other languages. In addition, the language must be adapted in the table ModuleSignature in the field Language (e.g.,1031 for German and in 1033 for English). Dialogs are in the directory C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\Deployment\VsdDialogs\0, ..1031, ..1033....

Background

The functionality to select Components in the set-up project is offered only by professional Installer editors, not by VS 2008.

Using the Dialog

Install the SelectionTree with the MSI-file. It installs three files VsdSelectionTreDlg_0.wid, VsdSelectionTreDlg_1031.wid, and VsdSelectionTreDlg_1033.wid, as VsdSelectionTreDlg.wid, in the above mentioned directories. It also installs the AddIn.

In the set-up project, select the new dialog Selection Feature and then determine the parameters functionality.

The SelectionTree

Add single files to the project or summarise before several files into Mergemodule and insert this. All together, 9 features can be inserted. Then insert the name of the file in the SelectionTree in field Files if it is a single file.

Mergemodule

Or insert the Guid-part of the ModuleSignature from the Mergemodule if you input Mergemodule. Give the number the used feature and suitable parameter. Fill the Title, Description and Directory. See also....

Level

Select the Level.

Parent

Select the Parent.

Level

Select the Display.

Points of Interest

For output, the Message in the Output-Window is used PropertyChangedEventArgs:

#region PropertyChanged
	// INotifyPropertyChanged - Ereignisbehandlung
    public event PropertyChangedEventHandler PropertyChanged;

    private void NotyPropertyChanged(string info)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(info));
        }
    }
#endregion

#region Info

    // Hifsvariable für Meldungen
    OutputWindowPane owP = null;
    private string ErrorText = "{0} **** {1}";
        
    /// <summary>
    /// Gibt bei jeder Änderung mit Debug.Print den Inhalt aus
    /// </summary>
    private string _LastErrorText = null;
    public string LastErrorText
    {
        get { return _LastErrorText;}
        set 
        { 
            _LastErrorText = value;
            NotyPropertyChanged("Geändert");
            owP.OutputString(_LastErrorText + "\n");
            owP.ForceItemsToTaskList();
            Debug.Print(_LastErrorText);
        }
    }
#endregion

LastErrorText = string.Format(ErrorText,"ERROR", 
                "Der Dialog 'SelectionTree' ist nicht in der Installer-Datei enthalten");

History

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
QuestionBuild the TestInstallFeature failed
doan0383
3:08 23 Nov '09  
Thank you for your article.
I'm a new guy in Making Installation.I see your article is very useful.
I could build TestInstallFeature project successful But I got the below error:

ERROR **** Der 'FeatureCount' kann nicht zurückgegeben werden
TEST **** Ob der Dialog 'SelectionTree' enthalten ist
OK **** Der Dialog 'SelectionTree' ist in der Installer-Datei enthalten
ERROR **** Die Installerdatei enthalt keinen SelectionTree
ERROR **** Die Installerdatei kann nicht angepasst werden

And result is that I don't see the selection as I expect when installing.
What's wrong with it? Confused Could you help me, please?

Thank you and greetings

doan0383

AnswerRe: Build the TestInstallFeature failed
Klaus Ruttkowski
22:58 23 Nov '09  
Hi,

which language have you put? Please, looks under C:\Programs\Microsoft Visual Studio 9.0\Common7\Tools\Deployment\0 ... 1031 ..1033 ... ??? whether VsdSelectionTreeDlg exists. For other languages you must rework VsdSelectionTreeDlg with Orca and copy.

Greetings
GeneralEmpty tree
a_l_p
0:04 23 Sep '09  
First, thank you for your great article.

I'm trying to use it, but the tree selection turns out to be empty.
Only it shows a node without text.
Even the project TestInstallFrature shows the empty tree.
Have I to modify some characteristic or option in VS2008?

Greetings
GeneralRe: Empty tree
a_l_p
22:44 23 Sep '09  
OK.
I just have to activate it in the Add-in manager

Thank you.
GeneralVery Nice, But ...
pita2009
19:37 21 Aug '09  
It's very nice, but if You had done it in english all the way it would have been more usefull
And why not make a selection tree with unlimited selections and levels.
All in all very Nice.

pita2009
GeneralRe: Very Nice, But ...
Klaus Ruttkowski
0:54 22 Aug '09  
The next Time I translate to english.
GeneralRe: Very Nice, But ...
Alek Davis
8:38 24 Aug '09  
Yeah, great article, but English version would be more helpful. Thanks.
GeneralRe: Very Nice, But ...
Klaus Ruttkowski
6:24 25 Aug '09  
New Dialog for neutral(0) and in us-english(1033) added.

Klaus Ruttkowski
GeneralRe: Very Nice, But ...
pita2009
4:42 22 Sep '09  
thx
GeneralGREAT!!!
Samir NIGAM
5:41 21 Aug '09  
Hi Klaus. nice article. take 5 from me. now i've one question: I've used Textboxes (A) dialog in my deployment n setup project to collect user credentials during installation process. now I want to put validation on these. i.e. without providing credentials, user can't proceed further. have u any idea to achieve it?

Samir NIGAM
My Articles

GeneralRe: GREAT!!!
Klaus Ruttkowski
6:56 21 Aug '09  
Hi Samir,

Smile thank you for your vote. I think you process the answer from the dialog (A) in a user's action.
Have a look at my article "Word Documents fill automatic with owner Data "in which I describe a user action (C#).Hand over the answer to the user action as a parametre.

Klaus Ruttkowski
GeneralGood work
Md. Marufuzzaman
7:11 20 Aug '09  
you wrote a nice article...Smile

Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.

Thanks
Md. Marufuzzaman


Last Updated 27 Aug 2009 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2010