Installation not working on WM6?

  • Thread starter Thread starter rory.groves
  • Start date Start date
R

rory.groves

Some (but not all) users are indicating that my application does not
install successfully when they upgrade to WM6 (no problems on same
device with WM5).

The application folder gets created in the /Program Files path, but no
files exist inside the folder.

Sounds like the installation is rolling back before it finishes,
however, there are no error messages.

I'm using NETCF2.


Any ideas?
 
Update on this -- I tried installing to the WM6 Professional Emulator
and it did not install either. No folder or anything, but the system
said installation was successful.

??
 
Did some more testing. Turns out that if i remove the reference to
"SETUP.DLL" in the installation package, it installs just fine.

I'm using that standard setup.cpp project to create a setup.dll that
makes some registry edits during installation. Is there a reason why
WM6 doesn't allow this?
 
Additional info:

Using File Explorer through ActiveSync, i can literally see the files
getting installed while the CAB file is installing. Then, on the last
step, all the files get removed including the application folder. And
the CAB file states "installation completed successfully"
 
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.
 
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.
 
Back
Top