Is there a way I can query the installation PC to determine if Direct X is Installed and if so what version ?
Announcement
Collapse
No announcement yet.
Direct X Installed & Version ?
Collapse
X
-
Re: Direct X Installed & Version ?
Beamish,
Here is the registry key that is created in response to having DirectX installed
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX
The value name is Version, if you wanted to check on the version number. The version number will come back as something like this 4.08.01.0810, this is for version 8.1.
Here is a quick script for you to run. I hope this works for you. I tested it on 98se, xp home and 2000 pro.
<IR_ACTIONS_LIST>
<Action name="Comment">
<Type>202</Type>
<Function>2</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Comment>Setting DoesKeyExist to a default value so we can run a test on it.</Comment>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%DoesKeyExist%</Variable>
<Value>NOTFOUND</Value>
<Evaluate>0</Evaluate>
</Action>
<Action name="Comment">
<Type>202</Type>
<Function>2</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Comment>This will search the registry to see if that key exists.</Comment>
</Action>
<Action name="Does Key Exist">
<Type>70</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%DoesKeyExist%</Variable>
<MainKey>3</MainKey>
<SubKey>SOFTWARE\Microsoft\DirectX</SubKey>
</Action>
<Action name="Comment">
<Type>202</Type>
<Function>2</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Comment>Now we are going to check and see if the key was found or not. If found it will check the version. if not it will tell you so.</Comment>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%DoesKeyExist% = "NOTFOUND"</Condition>
</Action>
<Action name="Message Box">
<Type>5</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<DialogTitle>Title</DialogTitle>
<DialogMessage>DirectX not installed</DialogMessage>
<Icon>3</Icon>
<Variable>%Result%</Variable>
<DialogType>0</DialogType>
<DefaultButton>0</DefaultButton>
</Action>
<Action name="ELSE">
<Type>206</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="Comment">
<Type>202</Type>
<Function>2</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Comment>This will check for the version of DirectX</Comment>
</Action>
<Action name="Get Value Data">
<Type>72</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%RegData%</Variable>
<MainKey>3</MainKey>
<SubKey>SOFTWARE\Microsoft\DirectX</SubKey>
<Value>Version</Value>
<AutoExpand>0</AutoExpand>
</Action>
<Action name="Comment">
<Type>202</Type>
<Function>2</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Comment>If it is less than 8.1 it will offer to upgrade</Comment>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%RegData% &lt; 4.08.01.0000</Condition>
</Action>
<Action name="Message Box">
<Type>5</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<DialogTitle>Title</DialogTitle>
<DialogMessage>You are running an older version of DirectX, would you like to upgrade.</DialogMessage>
<Icon>3</Icon>
<Variable>%Result%</Variable>
<DialogType>1</DialogType>
<DefaultButton>0</DefaultButton>
</Action>
<Action name="ELSE">
<Type>206</Type>
<Function>1</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="Message Box">
<Type>5</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<DialogTitle>Title</DialogTitle>
<DialogMessage>You are running the current version of DirectX</DialogMessage>
<Icon>3</Icon>
<Variable>%Result%</Variable>
<DialogType>0</DialogType>
<DefaultButton>0</DefaultButton>
</Action>
<Action name="END IF">
<Type>201</Type>
<Function>1</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="END IF">
<Type>201</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
</IR_ACTIONS_LIST>TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
-
Re: Direct X Installed & Version ?
Nice work Tig...
Corey Milner
Creative Director, Indigo Rose Software
Comment
-
Re: Direct X Installed & Version ?
[in my best Tigger voice]
Thanks buddy Bear
[/in my best Tigger voice]TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Comment
Comment