Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all 1354 articles
Browse latest View live

New Post: File association icon

$
0
0
Hi, what should go in the FileAssociation Icon property? Is it the path of the icon or (as the comments tell us) is it a reference to other wix entity?

This thread suggests adding an Icon xml tag and then reference it in the FileAssociation icon property, however there is no Icon class in the WixSharp library.

New Post: Multiple instances of managed project

$
0
0
OK. I have managed to test your scenario (at least a UI part of it).
The event you need to hook up to is UILoaded. It is called when UI shell is created and the first dialog is prepared for display. UInitialized event is actually not suitable for the task as at this stage the dialogs sequence is not ready.

I also reflected dynamic Dialog sequence creation in the sample here: https://github.com/oleg-shilo/wixsharp/commit/9d6b86d601e89694b3658f1843defb3ca17f0df3
project.UILoaded += Project_UILoaded;
...
staticvoid Project_UILoaded(SetupEventArgs e)
{
    // Simulate analyzing the runtime conditions with the message box.// Make a decision to show (or not) Licence dialog by injecting it in the Dialogs collectionif (MessageBox.Show("Do you want to inject 'Licence Dialog'?", "Wix#", MessageBoxButtons.YesNo) == DialogResult.Yes)
        e.ManagedUIShell.CurrentDialog.Shell.Dialogs.Insert(1, Dialogs.Licence);
}
Your dialog_Load is not much different and should work UI wise. Though keep in mind that in both cases when the event handler is invoked the first dialog is already displayed so Shell.Dialogs.Clear(); doesn't seems right and I used Dialogs.Insert(1,... instead.

I have tested my sample and I the UI part works as expected. The 'Licence' dialog is injected depending on the user MessageBox response.

However you need to be aware that your typically your OS shell will invoke your msi (via msiexec.exe) in the install/modify.repair/uninstall mode and the UI sequence reflects this mode one or another way. But I cannot exclude that just changing the way UI looks (dialog sequence) will automatically change the actual mode. The chances are that it will but you will need to test it.

New Post: Multiple instances of managed project

New Post: File association icon

$
0
0
This is what WiX documentation says:
For an advertised ProgId, the Id of an Icon element. For a non-advertised ProgId, this is the Id of a file containing an icon resource.
I know, it's not very clear/intuitive.

By default Wix# automatically links the Icon attribute to the parent file (e.g. exe file) thus the associated icon will be extracted from the exe resources at the index IconIndex (0 by default). I am not sure if WiX consider *.ico file as an "icon resource" (as opposite to exe files). If it does then you can add the icon file as new File(new Id("app_ico"), "app.ico") with further FileAssociation.Icon = "app_ico".

Though for the advertised setups according WiX spec it needs to be an Icon class. Wix# doesn't support Icon element directly so you will need to add it to inject it in a post-action:
project.WixSourceGenerated += Compiler_WixSourceGenerated;
...
staticvoid Compiler_WixSourceGenerated(XDocument document)
{
    document.Root
            .Select("Product")
            .AddElement("Icon", "Id=app_ico; SourceFile=app.ico");
...
If you feel that direct support for Icon element is trully beneficial please log it as a feature request on https://github.com/oleg-shilo/wixsharp

New Post: Please update Wix Bin to latest release!

$
0
0
Now it is WiX v3.10.3 (Stable). It was released in the summer of 2016.

New Post: How to add "MspPackage" package types to Bundles?

$
0
0
Is there a way to include "MspPackage" package types in Bundles?

New Post: How to add "MspPackage" package types to Bundles?

$
0
0
Wix# Bundle doesn't support MspPackage directly. Please add it as a feature request on GitHub/WixSharp.
In a mean time you can ad the element manually. I have extended the Bootstrapper sample with the demo for adding MspPackage element:
bootstrapper.WixSourceGenerated += (doc) => doc.FindSingle("Chain")
                                               .AddElement("MspPackage", 
                                                           "SourceFile=Patch.msp; Slipstream=no"); 

New Post: Please update Wix Bin to latest release!

$
0
0
Done in v1.3.0. https://github.com/oleg-shilo/wixsharp/releases

Wix# release package includes WiX binaries of the version that Wix# was tested against and it is not always the latest WiX release.

Please note that you can always install any version of WiX on your system and Wix# will find it in the %PROGRAMFILES% unless you have Wix# compilers configured to use an alternative WiW release.

New Post: install .net

$
0
0
im trying install .net in my installer

my code base on one of the threads here
string msiproject = buildmsi();

        var bootstrapper = new Bundle(productname,
                                new PackageGroupRef("NetFx461Web"),
                                new MsiPackage(msiproject) { DisplayInternalUI = true });
        bootstrapper.Version = new Version("1.0.0.0");
        bootstrapper.UpgradeCode = new Guid("929339fd-c7c1-43eb-9fad-a24a23b99802");
        bootstrapper.Application = new SilentBootstrapperApplication();
        bootstrapper.Build();
im getting an errors:

The Windows Installer XML variable 'WixMbaPrereqPackageId' is declared in more than one location. Please remove one of the declarations.

The Windows Installer XML variable 'WixMbaPrereqLicenseUrl' is declared in more than one location. Please remove one of the declarations.


also im new in wix so im not sure if this just build .net install file or automaticly install it
thanks

New Post: install .net

$
0
0
Have a look at Bundle.SuppressWixMbaPrereqVars. It should solve your problem.

Can you also confirm that the build output contains the Wix# generated warning indicating the solution to the problem?
======================================================
WARNING: It looks like one of the packages defines WixMbaPrereqPackageId/WixMbaPrereqLicenseUrl in addition to the definition auto-inserted by Wix# managed BA. If it is the case set your Bundle project SuppressWixMbaPrereqVars to true to fix the problem.
======================================================
Please use GitHub for further discussions as this website is no longer active.

New Post: install .net

$
0
0
Yes i see the warning.
The problem solved.
Thank you.

New Post: Internetshortcut

$
0
0
wix has some property called internetshortcut
<util:InternetShortcut Id="OnlineDocumentationShortcut"
                        Name="My Online Documentation"
                               Target="http://wixtoolset.org/"/>
is it not available in Wix#?

New Post: Internetshortcut

$
0
0
InternetShortcut as some other non-mainstream WiX elements is supported via custom user defined code elements. The whole InjectXML sample is dedicated to the technique.

In your case you need to define a little InternetShortcut class and then use it in the project declaration:
var project =
    new Project("MyProduct",
        new Dir(@"%ProgramFiles64Folder%\My Company\My Product",
            new InternetShortcut
            {
                Id = "OnlineDocumentationShortcut",
                Name = "My Online Documentation",
                Target = "http://wixtoolset.org"
            },
...
publicclass InternetShortcut : WixEntity, IGenericEntity
{
    [WixSharp.Xml]
    newpublicstring Id;
    [WixSharp.Xml]
    newpublicstring Name;
    [WixSharp.Xml]
    publicstring Target;

    publicvoid Process(ProcessingContext context)
    {
        var util = WixExtension.Util;

        //reflect new dependency
        context.Project.IncludeWixExtension(util);

        //serialize itself and add to the parent component
        context.XParent
               .FindSingle("Component")
               .Add(this.ToXElement(util, "InternetShortcut"));
    }
}
The Wix# strategy is to include (into the distribution) direct support for the less popular/frequent elements only in response to the user demand. If you feel that support InternetShortcut needs to be available directly (out of box) then please log the feature request on the project home page: https://github.com/oleg-shilo/wixsharp.

New Post: Using project environment variables

$
0
0
Hi,

i want to say something like that:
new Project("MyProject",
                    new Dir(@"%ProgramFiles%\MyProject",
                        new File(
                            @"..\bin\$(var.MyProject.PlatformName)\$(var.MyProject.ConfigurationName)\MyProject.exe")));
I get : "error CNDL0150: Undefined preprocessor variable '$(var.MyProject.PlatformName)'" ?

Regards

PS: a reference to project "MyProject" was added!

New Post: Changing registry permissions

$
0
0
Hi oleg,

is there an example showing how to change registry permissions?


Regards
Martin

New Post: Custom Action could be not found

$
0
0
Hi Oleg,
first at all you do good job with Wix#. Thanks.
I have some questions and hope that you can give me some answers.
  1. I got System.IO.FileNotFoundException for my CustomAction.dll. Do i something wrong ?
    I tried execute some c# code in Uninstall. How do i execute Custom Action during Uninstall or Install ? .NET Framework is 3.5 for Project and .Dll as Target.
  2. I can choose InstallDir. How do i search in Registry for Key during Installation? I need special Key from Registry where another Software installed. I need registren mydll as com during installation. How can i do this ?
    Im new in Wix and need starthelp.
    Thanls a lot for answers

New Post: localization

$
0
0
Hi, Oleg!
How can I change ManagedUI dialogs language to russain (in VisualStudio 2013 Managed Setup Custom Dialog progect)?
I set project.Language="ru-RU", project.Codepage="windows-1251", but it has no effect, dialogs text is english.
project.LightOptions += "-cultures: \"ru-RU\"" has no effect too

New Post: localization

$
0
0
Have a look at CustomUIDialog sample from Downloadable samples. It uses German localization.

Please use GitHub (https://github.com/oleg-shilo/wixsharp) for further discussions.

Just trying to make it more noticeable that Wix# has moved to GitHub

New Post: Wix# has moved to GitHub

New Post: Wix# has moved to GitHub

Viewing all 1354 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>