The scary thing is:
var CeAppMgrLocation
Is *exactly* letter for letter, capitalisation for capitalisation, the variable name I use 🙂
Could I possibly ask why you've added the "$0" to the end of the ExecWait line? In my own installers, I've always used the syntax:
ExecWait '${CeAppMgrLocation} "$INSTDIR\${APPFILENAME}.ini"'
(The odd variable name for the ini file is because I have to build so many PPC/Smartphone scripts that I ended up turning it into a template based on a few defines at the start 🙂 )
There are a few other registry keys that hold some useful information about the last/currently connected device which you might also find handy:
"HKCU\Software\Microsoft\Windows CE Services"
"DeviceProcessorType" (DWORD value containing numeric processor ID, e.g. 2577 for ARM based devices)
"DeviceType" = "PocketPC" or "Smartphone" (String value, used in the UnsupportedPlatforms/PlatformString of the .inf file)
"DeviceVersion" = DWORD value, seems to be a mangle of the OS version and build number, but you might be able to use it to identify the OS version with a little finagling.
These get updated whenever a Windows Mobile device connects and Activesync fires up, so it's a reasonable record of the last connected or currently connected Pocket PC.
Kieren