The DirectX Programmer's Reference includes an example setup program that you can use as a model for your application's setup program. The setup program is called Dinstall, and it is located in the \Dxsdk\Sdk\Samples\Setup directory. It installs a sample DirectX application called Rockem. It also demonstrates one way to configure the DirectXSetup function.
The lpszRootPath parameter of DirectXSetup specifies the path to the Dsetup*.dll files (Dsetup.dll, Dsetup16.dll, and Dsetup32.dll) and the Directx directory on your distribution media. These dynamic-link libraries and this directory should be located in the same directory as the Dinstall executable after it is compiled, unless there is an overwhelming reason to do otherwise. If all these files and directories are located in the same directory, the value of the lpszRootPath parameter should be set to NULL. This ensures that if the path changes when the files are placed on a compact disc or floppy disks from the root of the application, the DirectXSetup function still works properly.
For example, suppose Dinstall.exe, Dsetup*.dll, and the Directx directory are located in an application directory called D:\Funstuff during the testing phase. Then, when you burn the files on a compact disc, suppose you put them in the root. If the lpszRootPath parameter is set to "\FUNSTUFF", the setup program (Dinstall.exe) will not function from the compact disc. However, if the lpszRootPath parameter is set to NULL, the setup program will function in both cases, because the path to Dsetup*.dll, and the Directx directory are still in the current directory.
If you decide to place the Dsetup*.dll files and the Directx directory somewhere other than in the directory that contains Dinstall.exe, you must pass the appropriate parameters to DirectXSetup and load Dsetup.dll correctly. The lpszRootPath parameter of DirectXSetup should contain the full path to Dsetup.dll. In addition, you need to use the LoadLibrary and GetProcAddress Win32 functions in your setup program to locate Dsetup.dll.
The content of the Setup dialog box is determined by data supplied in the Dinstall.rc resource file.
After you have modified the Dinstall.c and Dinstall.rc files to fit your application's needs, compile them into the Dinstall.exe executable file. You can rename this executable file to anything you want (Setup.exe, for example).