I had the same problem with Neverwinter Nights 2.
To get NWN2 to run on Windows 7 - download this file -
Click Here- take ownership of the original file (look in c:\windows\system32 or c:\windows\syswow64 depending on your flavor of OS), rename it (I recommend renaming the extension to something other than
.dll in case you need the original file later on), then move the downloaded file into the same folder as the original. Good to go.
To get the NWN2 Toolset to function under Windows 7 - you need to manually install the actual DirectX 9.0c package. Best version to get is Microsoft's updated end-user redistributable, as this not only places the correct DirectX 9.0c files on your system, but will update any DirectX 10 files as well. The file can be found here - Click Here - download, unpack to any folder on your system, and run the dxsetup.exe file. The toolset will now run.
Neverwinter Nights 2 will now run after taking ownership and replacing the dxdign.dll file in c:\windows\syswow64\ (for x64 version).
It's a wonky problem with DirectX, not with NWN2 as I understand it.
-Post taken from broo2.blogspot.com.