Results 1 to 13 of 13

Thread: [2008] How to check if DirectX is already installed

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    [2008] How to check if DirectX is already installed

    What file do I need to search for to check if DirectX is already installed on end users system ?

    Thanks

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [2008] How to check if DirectX is already installed

    You could place your CreateObject call in a Try Catch code block and use Late Binding.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] How to check if DirectX is already installed

    Thanks RD. I should be clearer.

    I'm trying to setup Bootstrap Manifest Generator to add DirectX runtime as prerequisite.

    To do that I am setting up the Conditions on install. If DirectX NOT installed, install it.

    Valid options inlcude File Check or Registry Check or RegistryFile Check.

    Can you please tell me OR Is there any tutorial out there on properly setting up DirectX as a prerequisite in ClickOnce.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [2008] How to check if DirectX is already installed

    Dont know of any tutorial but you may want to search the games forum perhaps in addition to google.

    I was under the impression you were looking to use teh DX objects at the time of checking so my suggestion doesnt really apply to your needs.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: [2008] How to check if DirectX is already installed

    You can check for the following registy directory, and it's associated version key:
    HKEY_LOCAL_MACHINE\Software\Microsoft\DirectX

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] How to check if DirectX is already installed

    Thanks Alex. In Bootstrap Manifest Generator I have the registry check option under which I can enter HKEY_LOCAL_MACHINE\Software\Microsoft\DirectX

    but there must be a "Property for Result" and "Registry Value"

    Have you ever done this before ?

  7. #7
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: [2008] How to check if DirectX is already installed

    Nope to be honest I've never touched it or seen that before. Do you have any intellisense help or a help file telling you what those arguments are for?

    From the sounds of their names, I presume you might need to assign the return value to a variable, i.e. the equivalent of this in VB:
    Code:
    Dim retval as integer
    retval = methodcall(argument) 
    
    ' or i f the property is a byref argument:
    methodcall(retval , argument)
    The second suggests you can't look at a registry folder, but you need to specify a key name perhaps, which could be Version. Alternatively, it's after you to specify a value to check against that of the actual registry key value which would be tricky as you'd need to know all the possible released versions of DX for that. If the latter is the case, is there some sort of "any value exists" check this framework might provide - something similar to this for example:
    Code:
    If registryKeyVal <> string.empty

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] How to check if DirectX is already installed

    Thanks for trying Alex. It's a little difficult to go posting back and forth over these forums.

    Perhaps this would be a great tutorial and benefit to the community if someone more knowledgeable than me would try this out with me.

    Any volunteers ? The objective is to add DirectX runtime to ClickOnce's list of prerequisites.

  9. #9
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: [2008] How to check if DirectX is already installed

    Well, we're all here to help. To be honest bootstrappers are in the realm of C++ or possibly assembler programmers so I would assume none of us here have played with this before. You could try on the C++ forum on this site, but I just wondered whether you'd found any help files at all when looking at this tool so we could try and help you understand the arguments and put this into code for you.

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] How to check if DirectX is already installed

    Actually the bootstrap manifest generator is available for download here

    Adding DirectX as a prerequisite using this, makes it immediately available to ClickOnce. Do you have time to give it a go ? I would imagine anyone creating apps would need to bootstrap installers other than .net framework ???

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] How to check if DirectX is already installed

    Gentlemen, I was using the wrong version of Bootstrap Manifest Generator.

    Download the latest beta here with native 2008 support.

    This makes bootstrapping a breeze. Add the installer to the generator, set conditions and voila in your project under Prerequisites, you'll find your installer there.

    Rate this post if you find it helpful.

  12. #12
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: [2008] How to check if DirectX is already installed

    Cool, thanks for posting to let us know. Must admit, I was trying to lend a hand there for you but this was out of my league and hadn't done any of that side before - kind of a relief to hear that!

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  13. #13
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: [2008] How to check if DirectX is already installed

    Yea, when you plow through it once, it's not hard to do from that point on. I made a Bootstrap of .NET 2.0 SP1 not too long ago.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width