Robert Regnell

Regarding a CAB file installation - I have read over-and-over on how to avoid being prompted to install to different storage locations on a mobile device by simply removing the InstallDir line from the [CEStrings] section, and hard-coding the location in the [DestinationDirs] section of the INF file.

There's even an MSDN Library article mentioning it dated as late as 04/10/2007 titled "User Selected Installation" at http://msdn2.microsoft.com/en-us/library/aa924404.aspx

This does NOT work. It ALWAYS results in the following error ...

Error: Section [CEStrings] key "InstallDir" requires valid data

Does this or does this not work

TIA,

Bob



Re: Smart Devices General Question on removing InstallDir from [CEStrings] section of INF file

Ilya Tumanov

Are you using VS CAB project to generate CAB with empty application folder If so that won't work - VS always adds InstallDir macro into INF it generates. Create INF CAB manually without InstallDir and build CAB from command line.






Re: Smart Devices General Question on removing InstallDir from [CEStrings] section of INF file

sstennis

I've been trying to get this to work too. I found that a .inf file without the InstallDir key will only compile using CabWiz.exe from the Windows Mobile 6 SDK. However, once the .CAB file has been created it will NOT install onto a WM5 or WM6 device. If I re-include the InstallDir key, the .CAB file created from the WM6 SDK CabWiz.exe installs fine. Does anyone have thoughts on what I might be doing wrong, or is this feature simply not supported

Thanks!





Re: Smart Devices General Question on removing InstallDir from [CEStrings] section of INF file

Robert Regnell

I was able to work around this with a copy of cabwiz.exe (version 4.0.4332.0) from Visual Studio 2005. Then I could remove the InstallDir key and the CAB would NOT prompt me for the storage location upon installation.


Bob





Re: Smart Devices General Question on removing InstallDir from [CEStrings] section of INF file

sstennis

Cool! Thanks, Bob!

BTW: I discovered why my CAB file, once built without the InstallDir key, wouldn't install. The pszInstallDir arg in the Setup.dll exported functions is NULL when the InstallDir key isn't defined in the .inf file, and our Setup.dll wasn't checking for that state before attempting to use the value (bad). After fixing that, all is good! No prompt!