[Windows Mobile Apps and Games] MichelDiamond:
Short Description: HowTo easily change your Plugin from ATPluginInstaller to TICS_installer (for Plugin-Developers) - needs only some minutes :

1. use the attached install.mscr and uninstall.mscr from Post #1 ("SetupDll_and_Mort.zip")

2. In install.mscr only put these Lines:

instPath = SystemPath( "ScriptPath" )
plgPath=instPath\"test.plg"
callParameter="-addchange -plg:"&plgPath&" -cpr:currentPortrait"
RunWait(instPath\"TICS_installer.exe", callParameter)
callParameter="-addchange -plg:"&plgPath&" -cpr:currentLandscape"
RunWait(instPath\"TICS_installer.exe", callParameter)
RunWait(instPath\"CHomeRefresh.exe","")

If you use another .plg - not default.plg - just change second line to the name of the .plg you want to install with .cab

3. In uninstall.mscr only put these Lines:

instPath = SystemPath( "ScriptPath" )
RunWait(instPath\"TICS_installer.exe", "-delete -plugin:[I]YourPlugin[/I] -cpr:currentLandscape")
RunWait(instPath\"TICS_installer.exe", "-delete -plugin:[I]YourPlugin[/I] -cpr:currentPortrait")
RunWait(instPath\"CHomeRefresh.exe","")

Only replace "YourPlugin" with the name of yourPlugin - e.g. "CNitrogen"

4. Put this install.mscr, uninstall.mscr, TICS_installer.exe, setup.dll, MortScript.exe (don't forget! use Version, you want) and CHomeRefresh.exe to your Main Directory of your Plugin. Delete "ATPluginInstaller.exe" and "CEsetupDLL.dll"

5. Add the new Files to your .inf-File

6. Change in [DefaultInstall]-Section of your inf the Line to: CESetupDLL = "setup.dll"

7. Cab your Plugin - ready - now your Plugin works with TICS - and therefore for all Themes

Longer Example MortScript:

Here's the Mortscript, what would almost do the same while installing a cab for a Titanium Pluing like ATPluginInstaller,

but with the difference: In the current (=active) CPR - it's also attached as example in Post #1 as download

### Sample: Installation for TICS - called by setup.dll

instPath = SystemPath( "ScriptPath" )

### Code before call of TICS_Installer ###

# empty

### TICS_Installer call portrait	###

plgPath=instPath\"test.plg"
callParameter="-addchange -plg:"&plgPath&" -cpr:currentPortrait"
message(callParameter)
RunWait(instPath\"TICS_installer.exe", callParameter)

### Handle here returned Error-Code: portrait	###

errorcode=RegRead("HKCU", "Software\TICS","ErrorNumber")
if (errorcode ne "0")
messagetext="Portrait Installation failed: "& RegRead("HKCU", "Software\TICS","ErrorDescription")
message(messagetext)
exit
endif

### TICS_Installer call landscape	###

plgPath=instPath\"test.plg"
callParameter="-addchange -plg:"&plgPath&" -cpr:currentLandscape"
RunWait(instPath\"TICS_installer.exe", callParameter)

### Handle here returned Error-Code: portrait	###

errorcode=RegRead("HKCU", "Software\TICS","ErrorNumber")
if (errorcode ne "0")
messagetext="Landscape Installation failed: "& RegRead("HKCU", "Software\TICS","ErrorDescription")
message(messagetext)
exit
endif

### Code after call of TICS_Installer ###

Sleep(500)
RunWait(instPath\"CHomeRefresh.exe","")

message("finished")
exit

An example for uninstallation (parly) - it will uninstall your Plugin with the Name "Test" - replace it with the Name of your Plugin and it will work :)

...
RunWait(instPath\"TICS_installer.exe", "-delete -plugin:Test -cpr:currentLandscape")
RunWait(instPath\"TICS_installer.exe", "-delete -plugin:Test -cpr:currentPortrait")
...

Some other possible calls - e.g. also from C-/C++/-C#-/Whatever-Program:

// LPCWSTR ganzPar= L"-addchange -plg:\\Interner Speicher\\Sandbox\\test.plg -cpr:\\Interner Speicher\\Sandbox\\Titanium_480x640.cpr" ;

// LPCWSTR ganzPar = L"-addchange -plg:\\Interner Speicher\\Sandbox\\test.plg -cpr:currentPortrait";

// LPCWSTR ganzPar = L"-addchange -plg:\\Interner Speicher\\Sandbox\\test.plg -cpr:currentLandscape -isTICSSystemCall";

// LPCWSTR ganzPar = L"-delete -plugin:JMLToday -cpr:\\Interner Speicher\\Sandbox\\Titanium2_480x640.cpr";

// LPCWSTR ganzPar = L"-delete -plugin:Test -cpr:currentPortrait";

// LPCWSTR ganzPar = L"-delete -plugin:Test -cpr:currentLandscape";

// LPCWSTR ganzPar = L"-delete -plugin:Testplugin -cpr:all";

// LPCWSTR ganzPar = L"-delete -plugin:Testplugin -cpr:\\Interner Speicher\\Sandbox\\Titanium_480x640.cpr";

And here the Listings of the Registry-Keys in HKCU/Software/TICS :

callAction: Last kind of Call, e.g. addchange

callCPR: full-qualified path of CPR which should be changed

callOrgDefaultXML/callOrgExtXML/callOrgPlugins: Saves the DefaultXML/ExtensibilityXML/Plugins before Changing

callOverall: All Parameters which were given to TICS_installer

callPLG: full-qualified path of PLG which should be injected

callTypeCPR: direct or current

ErrorDescription: Long description of Error Message

ErrorNumber: Number of the Error

last...: The same as above for the Call before

new...: The changes of TICS in Registry - with "current" also in your Titanium - otherwise only here, so you can copy it after installation e.g. in install.mscr

Nice day 4 U

Micha