Installation not working on WM6?

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?
 
G

Guest

Have you tested it on the WM6 emulator to see if it fails there?


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com
 
R

rory.groves

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.

??
 
R

rory.groves

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?
 
R

rory.groves

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"
 
R

rory.groves

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.
 
R

rory.groves

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top