[Tip] Finding reg keys in EVK - Windows Mobile

This is just a quick tip; I stumbled across it a few weeks ago. Sometimes when you're cooking a rom, you might have a registry key over-writing one you're trying to cook in (in an .reg or .rgu, not a .provxml). Or, you may just want to remove a registry key that is causing issues. Frequently, the same key will appear in multiple places in the same file or in multiple packages. Anyway, if you go to the Tools folder in EVK, there is a file named "erviuspackages" (no extension). Open it up with notepad, and it has a list of every file in every package in your latest build as well as every reg key in every .reg or .rgu file. So, if you're looking for a reg entry, just search through the file. Recently, I was tracking down "Redirect"="powerexe.exe", because I wanted to disable HTC's power control panel to use the stock microsoft one. The bugger appears maybe a half dozen times in the kitchen (HTC really wants it cooked in, lol), and searching through the erviuspackages file was invaluable. I've also used it to track down a number of reg entries for non-existent dll's/drivers-running SK Tools Clean would always point out a couple dozen reg key paths for files that didn't exist. One key, for \Windows\TraRecoEnu.dll, appeared like a dozen times in the same .rgu in my oem folder.
When you find the reg key, you need to scroll up until you hit a list of files; it will also have the package name. Anyway, this makes finding crap in your kitchen a lot easier. I would guess that there is a similar file in OSKitchen, as it is also a visual kitchen, but I couldn't tell you the name or the location.

Have you tried this?
In EVK, load your ROM
Under Editors on the left hand side, check ALL
Click Show Editor
Now you have two search boxes. One searches just for File names and one Searches each folder in the kitchen for your search string. You can find any string in any file in the kitchen.
When it finds a match to your search string, EVK lists the files in the Right Hand List box.
You can then double click on each file in the box and it will open the file up in an editor.
Pretty slick! For me, it's the easiest way to find something, or anything in the kitchen.

both useful methods to know.
personally i added .reg and .rgu extensions to Windows search and set them to index both the name and file contents, then you can simply type/paste sections of reg keys into the windows explorer search box. (same with xml and provxml, and .cpr)

Related

Best way to deploy a registry edit?

I need to modify about 200 windows mobile 5 devices with a registry edit for my job.
(This is what I get for being the only person in the office familiar with WM)
What would be the easiest way to do something like this? Normally I use SD/MiniSD Cards to install apps on the various devices - it would be nice to be able to create a .cab that would modify the needed key, so that I wouldn't have to edit the registry manually on every device.
Suggestions?
http://forum.ppcgeeks.com/showthread.php?t=10668
Might want to browse that or message one of them. I know i read somewhere how to put reg edits in cab format, but i can't remember where i read that at.
WinCE Cab Manager. Awesome program. Used it to create a .cab that contains all my standard registry edits and a bunch of files that I like to use (themes and such). Allows me to customize any flashed ROM very quickly.
It isn't an inexpensive program (I think it was $100 or so), but worth it. You can't import registry edits into the trial version, but I believe you can manually enter registry edits.
If you struggle (and if the edit you need isn't something that is confidential to your company), I can throw it in a cab for you. PM me if I can assist.

Syntax Highlighting for Morscript using Notepad++

Mortscript for Notepad++
Hello guys, not sure whether this is the right place for this thread, but as MortScript seems pretty popular and santax highlighting makes things easier, I wrote a little script for use with Notepad++.
The attached file contains a file called userDefineLang.xml which you simply need to put into %APPDATA%\Notepad++ for the installed version or into Notepad++'s Program folder for portable version. If you open a Mortscript with Notepad++ for the next time, it will be highlighted. I am not sure whether I catched all functions, but this script can easily be extended by using Notepad itself.
Maybe it helps you a bit.
Regards
Cool contribution, thanks a lot. I use NPP as windows notepad replacement, and edit mortscripts with it as well. This should make it a bit easier
Cool. I use Notepad++ on my PC, But to make MortScript file on my phone i use zNotepad or MADE. zNotepad is made for making MortScript files. Thats the standard extension when you save a file. MADE is a great text editor wich I've used since I first got a windows mobile phone. They're both free but zNotepad comes with GSlide
Awesome, I tried to do this last week but notepad++ kept crashing on me...plus I can't ftp to my phone with this, so I use pspad.
Try CKE
Hi guys,
I use CKE as onboard editor. GSlide was more or less built on my P3600
CKE is by far the most competent code editor for pocket pc. With built-in support for syntax-colouring, indentation, running files with external apps etc.
I will post config files soon.
Ciao,
Lars
This is exactly what I was looking for! Thanks a bunch.
Thanks!!
I suggest you provide your UserDefinedLang to the Notepad++-Wiki.
http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=User_Defined_Language_Files
Notepad++ AutoComplete
I just created AutoComplete file: MortScript.xml
File should be placed here: \Notepad++\plugins\APIs\MortScript.xml
To have a instant Autocomplete change: Settings > Preferences > Backup/Auto-Complation according to file: AutoCompleteSettings.png
Enjoy

[App] [Apr-26-09] WM6.5 Plug-in Installer

AppStar Titanium
Plug-in Installer
This program allows chome/titanium plug-in developers to create a cab file that will insert the plug-in's markup into the cpr files depending on the device's resolution and update the registry without overriding any of the user's existing chome/titanium configuration files or settings.
Device Requirements:
1. WM 6.5
2. .Net CF 2.0 or higher
Usage:
First things first, this is a developer only tool that has strict requirements to work properly. It requires a few files to be deployed and files like the plg files are case sensitive. ATPluginInstaller.exe and CESetupDLL.dll can be used for any free, not for profit, chome/Titanium plug-in.
Ok, now onto the fun stuff...
ATPluginInstaller.exe is the program where most of the magic happens. It does a few important things. First, it adds a plug-in name to the registry in "HKEY_LOCAL_MACHINE\Software\Microsoft\CHomelugins" and also inserts the plug-in into the specified location in "HKEY_LOCAL_MACHINE\Software\Microsoft\CHome:ExtensibilityXML" and "DefaultXML". Then it clears all VALUES in "HKEY_LOCAL_MACHINE\Security\CHome\DefaultSettings" to prevent chome from reverting to an old layout. Finally it injects the appropriate markup for the device resolution into each of the Titanium CPR files.
For ATPluginInstaller.exe to know what plug-in and markup to use, it needs a PLG file. A PLG file is basically a pre-defined XML file that includes the name, position, and markup for the plug-in you want to install.
Begining of a sample PLG file:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<plugin>
<name>ATFavePeople</name>
<position>2</position>
<layouts>
<layout screenWidth="240" screenHeight="320">
<!-- ATFavePeople -->
<Layer ID="ATFavePeopleExpanded" Visible="False" Width="240" Height="82" Clip="False">
<Layer ID="Page" Clip="False">
<!-- Icon on upper right -->
<Image ID="Icon" Left="188" Top="-13" Width="43" Height="57" ScaleStyle="Stretch"/>
<!-- Large picture in Center -->
<Image ID="ContactPhoto" Left="10" Top="17" Width="43" Height="43" ScaleStyle="Fit" Clip="False">
<Layer ID="Border2" Color="#FFFFFFFF" Left="-2" Top="-2" Width="90" Height="90" Visible="True"/>
</Image>
(abbreviated to conserve space...)
The root node is "plugin". The three sub-nodes are "name", "position", and "layouts". All nodes must follow case to work with ATPluginInstaller.exe.
The "name" node contains the name of the plug-in you wish to install. It must match the name used in the plug-in markup.
The "position" node specifies where you want the plug-in to be displayed on chome. It is 0 based. Meaning the first spot is 0, the second spot is 1, and so on. If a number greater than the number of currently installed plug-ins is used, then the plug-in will be displayed at the bottom of chome.
The "layouts" node contains all the plug-in markup for the different device resolutions. Each resolution is defined by a "layout" sub-node with two attributes. The attributes are "screenWidth" and "screenHeight" which define what "layout" sub-node to use for each resolution. The "layout" sub-node contains the markup that will be injected into the CPR files. This markup is also case sensative and must follow the case that is used by Microsoft in the default CPR files or the sample attached PLG file.
To install a plug-in, simply call ATPluginInstaller.exe followed by the "-i" parameter and a space and then the PLG file name.
example: ATPluginInstaller.exe -i default.plg
ATPluginInstaller.exe is also uninstall friendly. Just replace "-i" with "-u".
example" ATPluginInstaller.exe -u default.plg
Well that's fine and dandy, but how the hell do I call ATPluginInstaller.exe from my CAB file? That's where a setup DLL comes into play. A setup DLL allows you to execute additional functions after a program is installed and before it is uninstalled. Working with setup DLLs are a pain in the butt because they don't support managed code, only C++. So I've attached CESetupDLL which is a setup dll that does two things:
1. It calls ATPluginInstaller.exe and installs, "-i", default.plg from the folder where the application is deployed to.
2. It calls CHomeRefresh.exe from the folder where the application is deployed to, to update Chome without performing a restart. (I didn't write CHomeRefresh and don't know who did but it works fairly well.)
CESetupDLL also works for CAB uninstall.
To include your CESetupDLL.dll in the INF file (file used to build installation CAB file) you have to add the following string to the [DefaultInstall] section:
CESetupDLL = "CESetupDLL.dll"
You can read more about setup.dlls here:
http://www.pocketpcdn.com/articles/setupdll.html
http://msdn.microsoft.com/en-us/library/aa924308.aspx
That's pretty much it! Remember to pay attention to case, and if you use my CESetupDLL.dll include ATPluginInstaller.exe, default.plg, and CHomeRefresh.exe to your program folder in your CAB.
Feel free to use ATPluginInstaller.exe and CESetupDLL.dll for any free, not for profit, chome/Titanium plug-in. Giving me some credit would be nice too. ;-)
Cool, thanks for this.
Let me make sure of the default.plg file, if I want to include cpr installs for different resolutions, I just add all of them to that one file, correct? Just change the layout screenwidth,screenheight for each new cpr I need to write, for both portrait and landscape. So for vga only, I would have two layout sections, one with screenwidth=480, screenheight=640 and then another layout with screenwidth=640, screenheight=480? If a cpr doesn't exist on device, then it just skips that one and goes to next?
Just wanted to make sure I understood it correctly as I plan on updating titaniumweather this week and wanted to use this.
showaco said:
Cool, thanks for this.
Let me make sure of the default.plg file, if I want to include cpr installs for different resolutions, I just add all of them to that one file, correct? Just change the layout screenwidth,screenheight for each new cpr I need to write, for both portrait and landscape. So for vga only, I would have two layout sections, one with screenwidth=480, screenheight=640 and then another layout with screenwidth=640, screenheight=480? If a cpr doesn't exist on device, then it just skips that one and goes to next?
Just wanted to make sure I understood it correctly as I plan on updating titaniumweather this week and wanted to use this.
Click to expand...
Click to collapse
Yeah, that's pretty much it. All the different resolutions in one file. In your case you would just need two layout nodes for VGA, one for portrait and one for landscape.
I'm working on getting next version of titaniumweather finished up and had a question/request. I noticed that your atplugin installer must be reading the defaultxml for plugin info before inserting and rewriting the default and extensibilityxml values. Is it possible to have it read the extensibilityxml for the info instead? A lot of people only update the extensibiliyxml when adding new panels since thats all that is necessary to show panels and with your current version all those panels are removed from extensibilityxml when atplugin installer runs. I can change it in chome editor to write to both locations, but still doesn't help out with someone that has made there own panels independently.
I've added option in weather to switch layouts using your atplugin app to change layouts for different style of weather icons, works very well to switch them out.
I just double checked and atplugininstaller reads from ExtensibilityXML first. It then injects the plugin name and updates ExtensibililtyXML and DefaultXML to the new value. I don't bother to read DefaultXML, I just override it since they both should be the same anyhow. I can change it to not override DefaultXML if users are having issues with it.
BTW, I'm glad to hear you got it working with additional layouts. I have the same feature in my latest Fave Contacts release. I was worried developers might have trouble because of case sensitivity. I use an XPath query and I'm not quite sure why the powers that be(W3C) decided XPath needs to be forced to case sensitive.
AppStar said:
I just double checked and atplugininstaller reads from ExtensibilityXML first. It then injects the plugin name and updates ExtensibililtyXML and DefaultXML to the new value. I don't bother to read DefaultXML, I just override it since they both should be the same anyhow. I can change it to not override DefaultXML if users are having issues with it.
BTW, I'm glad to hear you got it working with additional layouts. I have the same feature in my latest Fave Contacts release. I was worried developers might have trouble because of case sensitivity. I use an XPath query and I'm not quite sure why the powers that be(W3C) decided XPath needs to be forced to case sensitive.
Click to expand...
Click to collapse
huh, maybe just some weird issue I had going on then. After that first change up, everything after that didn't change my layout anymore. But I also updated chome editor to write to defaultxml too and reset my custom panels in after first change up, so maybe that fixed issue for me.
Yeah, got 4 or 5 different icon sets now, with different .plg files for each since most have different size icons and that was easiest way to have for future icon packs to be added without having to release new weather versions. Working on cab now, had trouble with install at first 'cause I was saving your ATPluginInstaller.exe to a subfolder under installation path, which is location I needed to work with my future addons. Got it sorted now(I think).
Is there a way to specify the CPR's to modify in the .plg file? I have made completely new CPR's for NeoTitanium. Instead of being Titanium_(Resolution).cpr, they are Neo_(Resolution).cpr, M2DNeo_(Resolution).cpr, & BWNeo_(Resolution).cpr. for the different themes. I did this so the user can swtich back and forth from NeoTitanium to Titanium (or the different themes) without uninstalling it.
Thank you soooo much. I am going to try this out.
drkfngthdragnlrd said:
Is there a way to specify the CPR's to modify in the .plg file? I have made completely new CPR's for NeoTitanium. Instead of being Titanium_(Resolution).cpr, they are Neo_(Resolution).cpr, M2DNeo_(Resolution).cpr, & BWNeo_(Resolution).cpr. for the different themes. I did this so the user can swtich back and forth from NeoTitanium to Titanium (or the different themes) without uninstalling it.
Click to expand...
Click to collapse
Hmmm... I was going to pull the CPR file name out of the registry, but decided against it because I didn't have any way of knowing that the PLG file was indeed targeted to that CPR anyhow. Adding a node to the PLG is a good idea. But we need to be very careful with distribution. If users got a hold of your PLGs and tried to use them with a Titanium layout they would not work.
Nice!
Very cool indeed.
Just the thing I'm looking for .
Was currently busy with pre-define cpr file to append at the titanium_(resolution_here).cpr, this surely helps a lot in making that happened.
Thanks!!!!!
I have a BIG question. In your ATFavePeople Cab you have a Setup.dll in the Main root of the cab but you don't talk about that. What is that Setup.dll for? I added the AtpluginInstaller, CESetupdll.dll, default.plg, and CHomeRefresh in the cab. Someone told the cab is unsuccessful when its installed and I can't quite figure out why.
JukEboXAuDiO said:
I have a BIG question. In your ATFavePeople Cab you have a Setup.dll in the Main root of the cab but you don't talk about that. What is that Setup.dll for? I added the AtpluginInstaller, CESetupdll.dll, default.plg, and CHomeRefresh in the cab. Someone told the cab is unsuccessful when its installed and I can't quite figure out why.
Click to expand...
Click to collapse
I replied to your private message but i'll repost here incase others need the info.
Hmmm.. There are a couple things you need to check. Make sure the have the CESetupdll.dll configured properly in your INF file.
To include your CESetupDLL.dll in the INF file (file used to build installation CAB file) you have to add the following string to the [DefaultInstall] section:
CESetupDLL = "CESetupDLL.dll"
Also make sure your cab file is extracting all the files to the same folder.
Just a heads up... I'll be leaving for a business trip tomorrow and won't be back till Monday. I'll get to any questions and/or fixes when I get back. Thanks guys!
SO what do I do about creating a setup.dll file when I don't have a program that can create .dll files.
Can someone tell me where the [Default Install] section is in CE Cab Manager.
AppStar said:
Hmmm... I was going to pull the CPR file name out of the registry, but decided against it because I didn't have any way of knowing that the PLG file was indeed targeted to that CPR anyhow. Adding a node to the PLG is a good idea. But we need to be very careful with distribution. If users got a hold of your PLGs and tried to use them with a Titanium layout they would not work.
Click to expand...
Click to collapse
This is why I was wondering if there was a way to call out a specific cpr file name. That way if the cpr doesn't exist on the "machine", the plg does nothing. Also, in the future on release you'll see a lot more custom named cprs. HTC I know uses their own naming. My smart phone has like 5 different sets of cprs on it.
Do you think there's a way to also include multiple plugins in the default.plg file?
I'm looking for a way to use the PluginInstaller to update existing .cpr default (Clock, Music, Photos, etc.) without messing up any additional/custom plugins people have put in.
Very nice. Thanks
Finally was able to install a plugin made by this installer...
Almost all my *.cpr files were read-only, so the plugin wasnt able to save them and kept giving me the "AtpluginInstaller.exe" error.
Changed them to non read-only with Resco Explorer and all worked fine.
Hi There.
don't know if I'm in the right topic if not I apologize.
I would like to know iif there is way to change the GUID of a "personnale" plugin. It seems that non standard plugin got the same guid, and on some case it makes trouble (I would like to put one of my personnal plugins by default when I press "hang" button).
Thanks

Edit Reg on first boot

Hi all, Before i ask my question let me say i have searched first and tried all the different suggestions but as its still not working i am asking here.
I have a series of reg tweaks (set timezone/delete beta key/set startmenu icons/set ringtone/screen backgrounds etc etc), basically all the tedious stuff i do after flashing. I have added this file as an app.reg, converted as a provxml, tried as a xml, had mortscript call it, placed in config.txt on operatorpkg dir, placed as a package in my EXT folder to run last (package folder name zz_mytweaks) - whatever i do its not setting ALL the reg keys?
No matter where/how/what format i place it, it always runs but sometimes it will set say the icons and timezone and some others but not other keys. Then i reflash THE SAME ROM and again it runs but some other keys will be set but not other ones which may have worked the first flash? There doesn't seem to be any reason why ALL the keys aren't being set as during different flashing attemps, all the settings have been changed but NOT ALL TOGETHER, just some this time, others next time etc etc so the reg entries are obviously correct.
Any suggestions?
Secc
When using Mortscript you could use a Sleep command to delay executing a reset.
You could also have a look at Sashimi. This works very well with importing numerous registry key's.
Concerning importing REG keys I found DotFred's Task Manager to contain the most reliable import function. Might have a look at that as well
mccune said:
When using Mortscript you could use a Sleep command to delay executing a reset.
You could also have a look at Sashimi. This works very well with importing numerous registry key's.
Concerning importing REG keys I found DotFred's Task Manager to contain the most reliable import function. Might have a look at that as well
Click to expand...
Click to collapse
Sashimi uses in fact this very TaskManager to export and import the registries. If you do not want to use Sashimi you can write a MortScript calling the TaskManager to backup all registries involved and to import them after flash. If your new ROM supports UC or XDA-UC, you can also import the registries that way.

[SOLVED] Programs "Start Menu" from imported ROM

I hate to ask on here because I feel like the answer should be obvious but it hasnt been.
I imported the latest AT&T ROM for the Tilt 2 in to OSKitchen and have been customizing/modding the heck out of it. Added my own software, removed most of the AT&T crap. Changed SYS to 21916 and even 2019 Manila without difficulty.
What is stumping me? The stupid default shortcuts for things like ActiveSync or email setup , remote destop Windows Live etc...
Most apps I have changed the app.dat to modify location for most things that I kept. However I have searched in both sys and EXT for prov.xml files, reg files basically ALL file contents looking for the likes of the apps above and just CANT find reference to them.
Is there some default behavior that says if a .lnk file exists in windows make a shortcut in the root of "Programs" ? or what am I missing. (Even that doesnt hold water though because activesync is actually async.lnk.
I know I can use something like mortscript to just move them around but this is more about wanting to know what the heck I seem to be missing. Thanks in advance and hopefully this isnt a stupid question.
hx4700 Killer said:
I hate to ask on here because I feel like the answer should be obvious but it hasnt been.
I imported the latest AT&T ROM for the Tilt 2 in to OSKitchen and have been customizing/modding the heck out of it. Added my own software, removed most of the AT&T crap. Changed SYS to 21916 and even 2019 Manila without difficulty.
What is stumping me? The stupid default shortcuts for things like ActiveSync or email setup , remote destop Windows Live etc...
Most apps I have changed the app.dat to modify location for most things that I kept. However I have searched in both sys and EXT for prov.xml files, reg files basically ALL file contents looking for the likes of the apps above and just CANT find reference to them.
Is there some default behavior that says if a .lnk file exists in windows make a shortcut in the root of "Programs" ? or what am I missing. (Even that doesnt hold water though because activesync is actually async.lnk.
I know I can use something like mortscript to just move them around but this is more about wanting to know what the heck I seem to be missing. Thanks in advance and hopefully this isnt a stupid question.
Click to expand...
Click to collapse
Try look in the initflashfiles.dat file.
Lol sure enough. More proof positive that Win7 search is garbage. I had it search file contents but for whatever reason it didnt find those shortcuts because it didnt search that file and it is indexed.
You can change the name of the actual .lnk then using an app.dat rename it and place it in where you'd like. I was having this problem with WM Live so I renamed the actual "WLMLauncher.lnk" to "_WLMLauncher.lnk" and then added this line:
Code:
Directory("\Windows\Start Menu\Programs\Internet"):-File("Windows Live.lnk","\Windows\_WLMLauncher.lnk")
to an app.dat in the Start Menu section of my kitchen.
This way whatever is natively calling that link won't be able to recognize it anymore.
If you're simply having trouble finding all the .lnks, just search your SYS XXXXX directory for ".lnk" and that should pull up all the async and email links that you're having trouble with.

Categories

Resources