|
-
Jun 10th, 2008, 11:54 AM
#1
Thread Starter
Fanatic Member
[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
-
Jun 10th, 2008, 11:57 AM
#2
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Jun 10th, 2008, 12:02 PM
#3
Thread Starter
Fanatic Member
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.
-
Jun 10th, 2008, 12:11 PM
#4
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Jun 10th, 2008, 12:30 PM
#5
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
-
Jun 10th, 2008, 12:36 PM
#6
Thread Starter
Fanatic Member
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 ?
-
Jun 10th, 2008, 12:49 PM
#7
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
-
Jun 10th, 2008, 01:35 PM
#8
Thread Starter
Fanatic Member
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.
-
Jun 10th, 2008, 01:54 PM
#9
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.
-
Jun 10th, 2008, 02:08 PM
#10
Thread Starter
Fanatic Member
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 ???
-
Jun 10th, 2008, 03:28 PM
#11
Thread Starter
Fanatic Member
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.
-
Jun 10th, 2008, 03:31 PM
#12
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!
-
Jun 10th, 2008, 03:35 PM
#13
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|