locked
dxwebsetup wierdness - deployment with app RRS feed

  • Question

  • Hi, sorry to post this in this forum, I am unsure where to post it.

    OK here is the thing.

    I have a deployment problem. I am creating a setup with my app, created in VS 2005 Pro, using C#(.NET 2.0)

     

    This app of mine requires DirectX runtime end user files, or the SDK but really the runtime files.

    Now, during installation, I bundled in the dxwebsetup.exe. This executes fine.

     

    2 main problems here already:

    1) I want to silently install it without the need for user interaction, switch used to do this: /Q. When specifying this, it just seems to show then disappear instantly. I then find this next problem:

    2) When running the dxwebsetup on its own (double click) or even within the app setup but without the /Q - it already says that the components are already installed - but they are not. Which leads me to also the next one:

    3) When running the dxwebsetup on its own (double click) and the components are NOT installed, it will download them - this works 95% of the time (this is what I want always....but it's not working with the Setup created with the app in VS 2005). Going back to the directory which the application is installed in, it copies the dxwebsetup to that directory also (both the same files) and when double clicked, it gives me problem #2

    But when running the file which was NOT included in the installer for this app, it works as it should.

     

    Seems like the VS 2005 setup/installer is making the external file (dxwebsetup) act differently...?

     

    This is running on a freshly built WS2003EE SP1 and all updates applied. NO other software at all.

    Now, when I RE-download the dxwebsetup from the MS site - it works as it should (downloads components) but again when bundled with the app setup, I get the same problem even though these 2 dxwebsetup's are the same

     

    I am confused - what is going on? Please can someone help the lost soul? :-)

     

    Wednesday, May 31, 2006 3:14 AM

Answers

  • DXWebsetup.exe is not part of the authorized redist package. Look at the documentation in <SDK Root>\Documentation\License Agreements to see what you are/aren't specifically allowed to redistribute.  Doing anything else could subject you to EULA violations, or worse, expose your end user to security issues that could leave you liable.

    The link that The ZMan provided is a complete and accurate description of what you need to do.  If there are specific problems you have while following that documentation, please let us know and we will do everything we can to help you.

    You will want to use the /silent option to avoid user interaction.

    Wednesday, May 31, 2006 4:37 PM
  •  ahmedilyas wrote:

    1) Can I include the dxwebsetup.exe in my app as a redistribution?

    Definitely not.  So question 2 is not applicable.

     ahmedilyas wrote:

    3) If I cannot include dxwebsetup, what other way can I redistribute safely the Managed directX files? (specifically Microsoft.DirectX.dll and Microsoft.DirectX.Directsound.dll)

     

    You remove the parts that aren't needed, which will significantly reduce the "50Mb" size you quote, and redistribute the runtime components.  The article here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/Installing_DirectX_with_DirectSetup.asp has very clear instructions on how to do this (see "Reducing the DirectX redistribution size"). 

    If server bandwidth issues are a problem, then you will want to point users to our websetup link and let them get the necessary latest updates.  This is the simplest approach for you, but requires the user take an additional installation step.

     

    Wednesday, May 31, 2006 5:52 PM
  • XP does not ship with 9.0c - 9.0c actually released long after Windows XP.

    XPSP2 does contain DX9.0c so anyone with XPSP2 will be safe.

    I have no clue what the coverage of XP without XPSP2 is.

     

    Saturday, June 3, 2006 3:09 AM
  • 'it might'...

    The problem is that since its not officially documented, nor supported it could change somehow, maybe new values are added to it, maybe its in a different place on Vista, who knows. MS do try to make things as backward compatible as possible but if someone is using an unsupported/undocumented method then its not as likely to be supported. So if you can use the official API it would be better.

    Saturday, June 3, 2006 8:58 PM

All replies

  • Last time I asked the Microsoft folks they told me that dxwebsetup is not allowed to be distributed in your applications without violating the SDK EULA. This may be why.
    Wednesday, May 31, 2006 7:51 AM
  • interesting - but I was told that it could be redeployed with your app as deploying the core files (dll) is NOT allowed therefore you need to include a redistributional package, like dxwebsetup.

    dxwebsetup only retrieves the files from the update server so i dont understand how it cannot be allowed.

    redistributing the core files (dll's) are of course not allowed, therefore the other solution is to include a redistributional package installer.

     

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/ds_license.asp

    Redistribution runtime
    A redistribution run-time package provided for vendors to bundle with their applications.

    Wednesday, May 31, 2006 11:41 AM
  • Hopefully David will come in and clarify, but that link is referring to the redist that comes in the SDK - dxsetup.exe and its usage is described here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/Installing_DirectX_with_DirectSetup.asp

    I'm not sure why its not allowed either, but when MS released the websetup we asked and were told that it wasn't allowed. Who was it that told you it was?

    However your interpetation of the license appear to be valid - though of course I am NOT  a lawyer.

     

    Wednesday, May 31, 2006 3:49 PM
  • DXWebsetup.exe is not part of the authorized redist package. Look at the documentation in <SDK Root>\Documentation\License Agreements to see what you are/aren't specifically allowed to redistribute.  Doing anything else could subject you to EULA violations, or worse, expose your end user to security issues that could leave you liable.

    The link that The ZMan provided is a complete and accurate description of what you need to do.  If there are specific problems you have while following that documentation, please let us know and we will do everything we can to help you.

    You will want to use the /silent option to avoid user interaction.

    Wednesday, May 31, 2006 4:37 PM
  • Sure I understand

    I remember a while ago I posted this question in the DirectX newsgroups.

    I cannot include the redistribution list as those do not have the managed DirectX files I require.

    I also cannot include the 50MB+ DirectX re-distribution End user software either because well, the file size and also the bandwidth for downloads on my server.

    So I thought by including the dxwebsetup in my app (300KB) all would be well until I hit the problem in my initial post.

    (edit as due to David's great response)

    1) If I cannot include dxwebsetup, what other way can I redistribute safely the Managed directX files? (specifically Microsoft.DirectX.dll and Microsoft.DirectX.Directsound.dll)

     

    I could provide a link for the download however the links could change in the future and prefer if I had everything possible in my installer.

     

    Many thanks, your input is valued! :)

     

    Wednesday, May 31, 2006 5:43 PM
  • Thanks David! Much appreciated. Well that sorts that out! :-)

    Just when I posted my questions above, you had replied - so I am wondering if you can take a look at those questions and get back?

    Greatly appreciated!

    Wednesday, May 31, 2006 5:45 PM
  •  ahmedilyas wrote:

    1) Can I include the dxwebsetup.exe in my app as a redistribution?

    Definitely not.  So question 2 is not applicable.

     ahmedilyas wrote:

    3) If I cannot include dxwebsetup, what other way can I redistribute safely the Managed directX files? (specifically Microsoft.DirectX.dll and Microsoft.DirectX.Directsound.dll)

     

    You remove the parts that aren't needed, which will significantly reduce the "50Mb" size you quote, and redistribute the runtime components.  The article here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/Installing_DirectX_with_DirectSetup.asp has very clear instructions on how to do this (see "Reducing the DirectX redistribution size"). 

    If server bandwidth issues are a problem, then you will want to point users to our websetup link and let them get the necessary latest updates.  This is the simplest approach for you, but requires the user take an additional installation step.

     

    Wednesday, May 31, 2006 5:52 PM
  • David: you're FANTASTIC - thank-you very much for your valuable time (and zman) for this, it has cleared it up :-)

    keep up the great work!!

     

    I will post back if I have issues with the installer and the Redist packages...

     

    Take care!

    Wednesday, May 31, 2006 5:54 PM
  • OK, I've included these files which I require:

    Dsetup.dll

    Dsetup32.dll

    dxsetup.exe

    Apr2006_MDX1_x86.cab

    Apr2006_MDX1_x86_Archive.cab

    dxupdate.cab

    dxdllreg_x86.cab

     

    However it does not seem to install/extract the Apr2006_MDX1_x86.cab file when running dxsetup.

     

    I am reading that I may need to use the DirectXSetup Win32API to register/install this using the Manageddx flag - is this correct?

     

    [edit]

    I had done that however (programmatically using the DirectXSetup() and giving it the manageddx flag to install managed directX) there is still no sign of the DirectX.dll and the directx.directsound.dll being extracted/installed. Help!

     

    What files do I actually need to include, legally, and for it to install the managed directx.dll and directx.directsound.dll files taking small amount of space in my installer? Just unfortunate I have to keep everything minimal as possible.

     

    [/edit]

    Any ideas?

    Wednesday, May 31, 2006 7:25 PM
  • Well after several tests/removements/appendments to the application installer, and thank goodness for Virtual PC (thanks MS!) I found out that I need these files to install the files I need for my application to run and with a total size of 3.5MB (awesome!)

     

    Apr2006_d3dx9_30.x86.cab

    Apr2006_MDX1_x86.cab

    Dsetup.dll

    dsetup32.dll

    dxdllreg_x86.cab

    dxsetup.exe

    dxupdate.cab

    Thursday, June 1, 2006 10:12 PM
  • Note that this group of files relies on the fact that the core DX9.0c files are already installed. I'm not 100% sure what, if any, error you will get if they are missing.

    Also if any of your users may be using an x64 machine I think you should include

    Apr2006_d3dx9_30.x64.cab

    Though I suspect everything may still work in some x86 compat mode.

     

    Friday, June 2, 2006 10:58 PM
  • Thanks

    yeh, my app is only for x86 users however I am sure it will still work ok for x64 factor and XP and higher OS's have DX9.0c installed by default :)

    as well as this I have performed a reg check on the version of DX the user has during the installation...just to be sure ;)

    Thanks

    Saturday, June 3, 2006 1:39 AM
  • XP does not ship with 9.0c - 9.0c actually released long after Windows XP.

    XPSP2 does contain DX9.0c so anyone with XPSP2 will be safe.

    I have no clue what the coverage of XP without XPSP2 is.

     

    Saturday, June 3, 2006 3:09 AM
  • yes you're correct, my mistake... about the DX 9.0c

    However it has been included in my setup to detect DX and inform the user if the version is not met.

    Cheers!

    Saturday, June 3, 2006 2:57 PM
  • >However it has been included in my setup to detect DX and inform the user if the version is not met.

    Great, hopefully you are using http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/DirectXSetupGetVersion.asp, since this is the only supported way to check for DirectX.

    Saturday, June 3, 2006 5:41 PM
  • well, using the registry should work too surely, i tested and it did but I will also try that!

    great to know you like to help out and improve out other people's workings, good job

    Saturday, June 3, 2006 8:46 PM
  • 'it might'...

    The problem is that since its not officially documented, nor supported it could change somehow, maybe new values are added to it, maybe its in a different place on Vista, who knows. MS do try to make things as backward compatible as possible but if someone is using an unsupported/undocumented method then its not as likely to be supported. So if you can use the official API it would be better.

    Saturday, June 3, 2006 8:58 PM
  • yeh that's true but I am sure it will be the same in Vista, at least the beta's and pre-beta's I had used.

    But yeh of course, if there are API's provided with the setup, use it - best practice

    :-)

    Saturday, June 3, 2006 10:16 PM
  •  The ZMan wrote:

    Hopefully David will come in and clarify, but that link is referring to the redist that comes in the SDK - dxsetup.exe and its usage is described here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/Installing_DirectX_with_DirectSetup.asp

     

    I'm still confused or doing something wrong. The link indicates a standard install should allow managed DX to run.

    The standard install is easy:

    1. If your application requires managed code, verify that the Microsoft .NET Framework is installed. Otherwise, skip to the next step.
    2. Call DXSetup.exe from the command line.

    After installing the Microsoft .NET Framework on a WindowsXP machine I ran the dxsetup.exe application, accepted the agreement, and clicked next to "To start installation, please click Next." The install completes without errors and reports "The components installed are no ready for use."

    When I run the 2005 DX application I get the following error:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DirectX.Direct3D, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    File name: 'Microsoft.DirectX.Direct3D, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
       at noise3d.ticTacToe..ctor()
       at noise3d.fMain.bCreateTic_Click(Object sender, EventArgs e) in C:\Documents and Settings\Owner\My Documents\Visual Studio 2005\Projects\noise3d\noise3d\fMain.vb:line 48
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

     

    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    noise3d
        Assembly Version: 0.0.1.3
        Win32 Version: 0.0.1.3
        CodeBase: file:///C:/Documents%20and%20Settings/Nova/Desktop/noise/noise3d%20v0.0.1.3/noise3d/noise3d/bin/Debug/noise3d.exe
    ----------------------------------------
    Microsoft.VisualBasic
        Assembly Version: 8.0.0.0
        Win32 Version: 8.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Runtime.Remoting
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.


     

    Johnny

     

    Saturday, September 16, 2006 12:44 AM
  • Thank you for the fast responce to my post :)

    Ah that did it. Running the first link gave me a "DirectX Runtime Optional Components" message from the setup program. The install reported it as an "11.6 MB" download.

    Please let me know if this is correct. I want to make sure I have a clear understanding of what to do in the future :)

    To install the managed libraries on a machine that has DirectX 9.0c but not .NET 2.0 without using the Custom Install procedures, I must: 

    1) Install .NET 2.0.

    2) I must refer the user to the latest version of DirectX on the microsoft website (similar to your first link).

    Sound right?

     

     

    Saturday, September 16, 2006 1:12 AM
  • well you can just install the managed libraries on the computer. I'm unsure if the .NET Framework is needed however you can test this yourself on a test machine or fire up a Virtual Machine :-)
    Saturday, September 16, 2006 1:24 AM
  • To install the managed libraries on a machine that has DirectX 9.0c but not .NET 2.0 without using the Custom Install procedures, I must: 

    1) Install .NET 2.0.

    2) I must refer the user to the latest version of DirectX on the microsoft website (similar to your first link).

    Yes... that is the only way to get the managed runtimes without writing your own setup. you CANNOT include the managed runtime files, nor install them yourself without viloating the EULA.

    Sunday, September 17, 2006 11:43 PM
  • So then how does one check to see if MDX is installed on client maching using .Net 2.0 + MDX?

    TIA,

    lushdog
    Wednesday, November 1, 2006 3:13 AM
  • You do not check for, you include the setup files and call dxsetup to determine and install whatever is missing. If nothing is missing it will return very quickly. Read through this thread is has all the information you need.
    Wednesday, November 1, 2006 5:37 AM
  • I got a MDX1 app that is having installation problems. The target computer already got .Net 2.0 installed. And I ran DXSETUP.exe on the target computer from the DirectX SDK redist directory. But the app is just keep on crushing. I debugged and find out it throws an "Application Error" on creating new Device(). I eventually get the app running by installing the whole SDK on the target computer (about 500MB). I know cannot and I wouldn't want to redistribute the whole SDK. Any ideas how to solve this problem?

     

    Thursday, December 7, 2006 5:46 AM