I have encountered the same problem.... After looking around a little bit, it seems that Microsoft has changed the location of the GetLastError() function... To see this, do a dumpbin -exports kernel32.dll. You will see something like:
**************************************************
Dump of file kernel32.dll
.
.
.
346 159 000684FF GetLargestConsoleWindowSize
347 15A GetLastError (forwarded to NTDLL.RtlGetLastWin32Error)
348 15B 0006E21C GetLinguistLangSize
.
.
.
************************************************
Compare this with the output from any version of kernel32.dll before WINXP, and you will see that the function is not forwarded....
I have tried using the RtlGetLastWin32Error() function directly in my InstallScript, but this makes no difference... The return is always 0...
Has anybody figured out how to solve this....??
I guess I have to convert all of the code for installing services to a custom DLL.....