After much research, i discovered a single method in Setup.cpp which
caused the installation to roll back:
SHGetSpecialFolderPath(...) as used here:
(from Setup.cpp)
///////////////////////////////////////////////////////////
//PURPOSE : HANDLES TASKS DONE AT END OF INSTALLATION
///////////////////////////////////////////////////////////
codeINSTALL_EXIT Install_Exit(
HWND hwndparent,LPCTSTR pszinstalldir,
WORD cfaileddirs,WORD cfailedfiles,WORD cfailedregkeys,
WORD cfailedregvals,
WORD cfailedshortcuts)
{
TCHAR _path [100];
// Gets Program Files path
SHGetSpecialFolderPath(NULL, _path, CSIDL_PROGRAM_FILES, 0);
<--------- This line is the culprit
This all works just fine in WM5 or prior. But no-go in WM6. If i
comment out that single line, the installation will not rollback in
WM6.
rory.groves@gmail.com - 11 Aug 2007 18:14 GMT
Solution:
Change
TCHAR _path [100];
to
TCHAR _path[MAX_PATH];
Then this line works:
SHGetSpecialFolderPath(NULL, _path, CSIDL_PROGRAM_FILES, 0);
That is, the installation does not roll back on WM6.