Finding the Most Recently Used Direct3D Application
The Windows registry stores a lot of interesting information, and is home to a lot of settings in Windows. Many people seem to overlook this when looking for information, most likely because it can be very intimidating. Things aren't always as hard to find as you might imagine; Most settings are spelled out in plain english. One interesting piece of information I just found out you can obtain is the most recently used application that utilized the Direct3D API. I'm not exactly sure how this could be useful information, but in the right environment, it might be something you need to know. Anyway, the name of the last executable to initialize the Direct3D API is located in the following registry key: HKEY_CURRENT_USER\Software\Microsoft\Direct3D\MostRecentApplication, and the value's name is Name. For example, my computer is currently set to googleearth.exe because that is the last Direct3D-enabled app I used. Anyway, hopefully someone finds this interesting and useful :) Here's a VB script to grab the value, and if you want to use it, copy/paste the text into a .VBS file and double-click it to run it:dim appname
set regprov = GetObject("winmgmts:root\default:stdregprov")
regprov.GetStringValue 2147483649, "Software\Microsoft\Direct3D\MostRecentApplication", "Name", appname
wscript.echo appname