[Windows Mobile Software Development] howdykeith:
Install n Forget

You've made a cab.

You've installed Your App.

But it don't run.

Crackers! You haven't installed Mortscript yet and all is lost.

But there is the lost way of the mystic key bangers.

If Mort not installed, use our exe.

If Mort is installed, use our localized Mort.exe?

Mort is installed, use the existing Mort.exe?

Installing with Mortscript.exe

Script dump from Personalizer:

# install.mscr - Used for post processing of a cab installation
# Notes:
# - Requires MortScript's setup.dll to be used by the cab.
# - MortScript.exe must be installed in the %installDir% along with this script
#

# what is our path?
instPath = SystemPath( "ScriptPath" )

# check if icon resource needs updating?
iconFile = "ScriptIcons.dll"
iconVersReq = 5
iconVers = 0
iconRefCount = 0

If ( FileExists( instPath \ iconFile ) )
If ( FileExists( "\Windows" \ iconFile ) )
If ( RegValueExists( "HKLM", "Software\Mort's MortScript", "ScriptIconsVersion" ) )
iconVers = RegRead( "HKLM", "Software\Mort's MortScript", "ScriptIconsVersion" )
iconRefCount = RegRead( "HKLM", "Software\Mort's MortScript", "ScriptIconsRefCount" )
EndIf

If ( iconVers < iconVersReq )
Copy( instPath \ iconFile , "\Windows" \ iconFile, 125 )
RegWriteString( "HKLM", "Software\Mort's MortScript", "ScriptIconsVersion", iconVersReq )
EndIf

iconRefCount = iconRefCount + 1
RegWriteDWord( "HKLM", "Software\Mort's MortScript", "ScriptIconsRefCount", iconRefCount )
Else
Copy( instPath \ iconFile , "\Windows" \ iconFile, 1 )
RegWriteString( "HKLM", "Software\Mort's MortScript", "ScriptIconsVersion", iconVersReq
RegWriteDWord( "HKLM", "Software\Mort's MortScript", "ScriptIconsRefCount", 1 )
EndIf
EndIf

Delete( instPath \ iconFile )

ShowWaitCursor

# Make sure there is a MortScript.exe on the device for this app
# even if installing to the storage card
If ( Find( instPath, "\Storage Card" ) = 1 )
msPath = SubStr( instPath, 14 )
If ( NOT DirExists( msPath ) )
MkDir( msPath )
EndIf
Copy( instPath \ "MortScript.exe", msPath \ "MortScript.exe", 1 )
Else
msPath = instPath
EndIf

# remove previous version's reg settings
If ( RegKeyExists( "HKLM", "Software\Mort's MortScript\Personalizer" ) )
RegDeleteKey( "HKLM", "Software\Mort's MortScript\Personalizer", YES, NO )
EndIf

#remove notifications
RemoveNotifications ("\ExtendedRom\Program Files\Personalizer\Personalizer.mscr" )
RemoveNotifications ("\Storage Card\Program Files\Personalizer\Personalizer.mscr" )
RemoveNotifications ("\Program Files\Personalizer\Personalizer.mscr" )
RemoveNotifications ("\ExtendedRom\Program Files\Personalizer\Personalizer.mscr" )
RemoveNotifications ("\Storage Card\Program Files\Personalizer\Personalizer.mscr" )
RemoveNotifications ("\Program Files\Personalizer\Personalizer.mscr" )
RemoveNotifications ("\ExtendedRom\Program Files\Personalizer\Personalizer.mscr" )

RemoveNotifications ("\ExtendedRom\Program Files\Personalizer\Personalizer.mscr" )
RemoveNotifications ("\Storage Card\Program Files\Personalizer\Personalizer.mscr" )
RemoveNotifications ("\Program Files\Personalizer\Personalizer.mscr" )
RemoveNotifications ("\ExtendedRom\Program Files\Personalizer\Personalizer.mscr" )
RemoveNotifications ("\Storage Card\Program Files\Personalizer\Personalizer.mscr" )
RemoveNotifications ("\Program Files\Personalizer\Personalizer.mscr" )
RemoveNotifications ("\ExtendedRom\Program Files\Personalizer\Personalizer.mscr" )

RemoveNotifications ("\ExtendedRom\Program Files\Personalizer\MortScript.exe" )
RemoveNotifications ("\Storage Card\Program Files\Personalizer\MortScript.exe" )
RemoveNotifications ("\Program Files\Personalizer\MortScript.exe" )
RemoveNotifications ("\ExtendedRom\Program Files\Personalizer\MortScript.exe" )
RemoveNotifications ("\Storage Card\Program Files\Personalizer\MortScript.exe" )
RemoveNotifications ("\Program Files\Personalizer\MortScript.exe" )
RemoveNotifications ("\ExtendedRom\Program Files\Personalizer\MortScript.exe" )

RemoveNotifications ("\ExtendedRom\Program Files\Personalizer\MortScript.exe" )
RemoveNotifications ("\Storage Card\Program Files\Personalizer\MortScript.exe" )
RemoveNotifications ("\Program Files\Personalizer\MortScript.exe" )
RemoveNotifications ("\ExtendedRom\Program Files\Personalizer\MortScript.exe" )
RemoveNotifications ("\Storage Card\Program Files\Personalizer\MortScript.exe" )
RemoveNotifications ("\Program Files\Personalizer\MortScript.exe" )
RemoveNotifications ("\ExtendedRom\Program Files\Personalizer\MortScript.exe" )

#start setup

Run( msPath \ "MortScript.exe", "/wait=15 """ & instPath \ "Personalizer StartUp.mscr" )

It seems the only problem is that smartphones can't use the setup.dll