This release fixes minor issues found to cause DDKBUILD.CMD to fail under certain conditions, especially when either the DDK/WDK or the project was located in a folder that contained spaces or that had long (folder/file) names without spaces.
One common example would be:
C:\Program Files\WINDDK
While most of this can be attributed to the setenv.bat
script (part of the DDK/WDK), which is flawed, there should have been an easy workaround. It turned out the easiest way could be to use short (i.e. 8.3) file names. However, the NT script interpreter is flawed. Exactly the part which is supposed to convert long to short file/folder names fails with the extension. Example: when calling a sub or a script, the parameters get passed as %1
through %x
(x being the number of the last parameter). If you use for /?
, you can easily see that %~fs1
is supposed to remove the surrounding double quotes from the first parameter, expand it to a full path (including drive letter, folder path, file name and file extension) and return it as a short file name. However, it appears that exactly this part is flawed (looks like the return buffer is not properly zero-terminated), because the extension (if a long folder name part contained a dot) does not get cut off after four characters (including the dot). That means a long path such as 3790.1830
(well known from the Windows 2003 Server DDK) gets translated to 3790~1.1831830
instead of the expected 3790~1.183
.
The workaround I used for this was to cut the extension at 4 characters (i.e. under normal circumstances after the dot and the three following characters), to make sure it fits to the 8.3 convention, introducing a new sub called MakeSub
. This is also used to convert the (long) path name of the project (location of SOURCES
) into a short path name.
Up to now this worked for all samples. Please report any failure, including the name of the folder which fails.
Update: the file is also available from osronline.com!
// Oliver