Setup: DirectSetup API Game Setup Sample

Click to open or copy the files for the Setup sample.

This sample is an example of how to use the DirectSetup API to install DirectX subsystem and DirectX drivers.  It also serves as a working template for ISV's to install a game.

For more information about DirectSetup, see DirectSetup in DirectX 5.

For this program to run, the redist directory (on the CD) must be copied into the same directory as setup.exe.  The entire Redist directory and all its subdirectories must be copied for setup to work correctly, with the exception of the driver directories (discussed below).

The driver directories (contained in \redist\directx\drivers) contain localized versions of Microsoft-provided display and audio drivers. You may omit any number of these driver directories from your redistributable to omit support for driver upgrades for those languages. If you choose to omit driver support for a particular language, you must omit the entire directory and its contents. Likewise, if you choose to include driver support for a particular language, you must include the entire directory and its contents. Setup will not function properly otherwise.

Do not add, remove, rename or modify any files or directories in the redist directory tree (except for omitting language directories). Setup will not function properly if any of the contents are altered.

Building SDK Samples

This sample uses the following keywords:

_lclose; _lcreat; _lwrite; _shfree; ansinext; catpath; deleteobject; dialogbox; directxsetup; directxsetupgetversion; enablewindow; enddialog; exitwindowsex; free; getdlgitem; getmodulefilename; getmodulehandle; getshortpathname; getwindowsdirectory; getwindowtext; loadcursor; loadimage; loadstrfromres; lstrcat; lstrcpy; lstrlen; makelong; makeshortcut; masterdlgproc; messagebox; release; senddlgitemmessage; sendmessage; setbitmap; setcursor; setdlgitemtext; setfileattributes; setfocus; setinfotext; setwindowtext; shbrowseforfolder; shfileoperation; shgetmalloc; shgetpathfromidlist; showwindow; sprintf; switch; winexec; winmain; wsprintf; wvsprintf