Delete reg key with batchfile? - Windows Mobile Development and Hacking General

I do a lot of "upgrading" on my HTC Wizard. And was wondering......
After the upgrade I always have to:
- execute a program
- remove a regkey
- Install a certifacate
- Install a second program
Can I somehow make a batchfile for this?
If not can I create a file that is capable of deleting a reg-key?

Easy to do with mortscript:
RegWriteString ("HKLM", "\Software\blablabla","your_string", your_string_value)
RegWriteDword("HKLM","Software\blablabla","your_dword","0")
or with a provxml?
you can remove regs with
noparm and nocharacteristic

Related

Ext Rom Customisation

Hi All,
I am meddling with my ext rom. I am setting it to auto install s/w upon hard reset. it works fine. I found out that when i hard reset the pda and phone volume is set to half. How do i make it to full ? Also, i would like to know
how do i move some files to some other folders. eg: ringtones, etc.
One option is to use the CAB Wizard and create a Small CAB File with your settings for Registry - Cab wizard allows you to put files into specific folders etc and all this you can do without writing ONE SINGLE LINE OF Script.
Another option is to do it via script :
In the config.txt you can add the lines :
CPY1:\Extended_ROM\CabInstall.exe
CPY2:\Windows\Start Menu\Programs\CabInstall.exe
Means the Cabinstall.exe will be copied from the extended_Rom to the Programs folder in Windows\Start Menu.
The Registry keys you can check out on the link :
http://wiki.xda-developers.com/index.php?pagename=BA_Hacks
If they are not there - PM me and I shall send them to you...
Rgs/DD
thanks! I downloaded the PHM Reg editor and followed the instructions under Microsoft Application Installer -> Changing the setting so that it asks you where to install a cab on the link above..
It worked.. my ipaq now ask me where to install the cab files!
brilliant... thanks again!

ReLoad v0.1 Beta

ReLoad
This is a MortScript script written to simplify reinstalling cab files, and restoring files back to the device from a zip file on the trinity.
More information about MortScript at http://www.sto-helit.de
-v.01 Initial Release
Known Issues
-Cab files that initiate the installation of another cab file ie.Wisbar Advanced
-How to setup:
1)Extract Reload.rar to your storage card.
2)Place cab files in the CabsAuto folder if you want to the cab to be automatically installed to the device (installation to automatically install to the storage card is currently not available).
3)Place cab files in the CabsManual folder if you want to be able to choose where to install the cab.
4)Place file in the Backup.zip file that you want to be restored.
ie. If you wanted example.jpg to be placed in the \Windows folder, place example.jpg in the Windows folder of the zip file.
*Please note that the cab files placed in the CabsAuto folder need to conform to only asking the user for the installation destination, then showing installation successful/unsuccessful. Otherwise you might encounter some
problems. You should place cabs that don't conform in the CabsManual folder, or adjust these cab files with programs such as WinCE CAB Manager.
-How to use:
1)In the Reload folder, execute Run1st. Click ok the the window that pops up. This just installs MortScript
2)Execute Run2nd. This will initiate the script that will first install the CabsAuto, then CabsManual, and finally restore the files in the zip file.
Use at your own risk.
Download
http://rapidshare.com/files/29964511/Reload.rar.html
Thx, that's a good idea.
is there a way to have it restore registry entries from a .reg file?
Is there a way to install certain cab files on RAMDisk/Storage card without individually clicking the install option??
@racerx_
Currently there isn't a way to restore the reg file directly. But you can create a cab from the reg file and then have that cab automatically installed.
MortScript wasn't able to read in the reg files i saved with resco explorer, so I gave up on doing it this way. For right now the easiest way is to create a cab file with WinCE Cab Manager.
@c_shekhar
The best way to install the program to the Storage Card, backup the reg (and any possible files installed on rom), then create a cab from this.
This post has alot of good information on this.
http://forum.xda-developers.com/showthread.php?t=277727
yeah, i've been trying like a madman to get win ce cab manager to make a cab of my .reg file.. but when i click on 'import' and try to grab the .reg file it tells me it's only for registered versions of the program.. is there another way i'm not seeing? cause right now the only other options i see for registry entries is to manually create them one by one which doesn't sound very exciting hah
thanks for the help..
@racerx
What OS and version of WinCE Cab Manager are you running. I heard of some problems with the newest version of WinCE Cab Manager with Vista. I am running version 2.1.0.35.
If that isn't it, you might have run the program past its initial trial use.
hmm.. Win Ce CabManager is 2.1.0.50 running on xp.. still got 17 uses left.. sigh..
Maybe i missed something. Just in case, what button or command are you using to get your .reg file into WinCE? I was using the 'file' 'import' command.
@racerx
That's the same way I do it. I would find an older version and try it again.
Reload V0.2
I made a couple of changes to the script for a rom we are going to be releasing soon...it checks if Backup.zip exists and only does the unzip if it does...I also added a SDBackup.zip for files to unzip to Storage card (specifically exe's and dll's I've already upx'd to shrink them but reinstalling the cabs replaced them again so this puts them back)....
#ReLoad
#v.02 Initial Release
#Use at your own risk.
#v.02 Extract files from SDBackup.zip to Storage Card
If(Question("Do you want to ReLoad?", "Reload 0.2", "YesNo")="No")
EXIT
EndIf
Run("Storage Card\ReLoad\Bin\Message_Running.mscr")
RegWriteDWord("HKLM", "Comm", "AutoRunFlag", "0")
RegWriteString("HKLM", "Comm", "AutoRunCFG", "\Storage Card\ReLoad\CabsAuto\Config.txt")
#Create Config File
Delete("\Storage Card\ReLoad\CabsAuto\Config.txt")
WriteFile("\Storage Card\ReLoad\CabsAuto\Config.txt", "SHOW:\Storage Card\ReLoad\Bin\ReLoad.bmp^NL^")
ForEach x in files { "\Storage Card\ReLoad\CabsAuto\*.cab" }
WriteFile("\Storage Card\ReLoad\CabsAuto\Config.txt", "CAB: ", 1)
WriteFile("\Storage Card\ReLoad\CabsAuto\Config.txt", x, 1)
WriteFile("\Storage Card\ReLoad\CabsAuto\Config.txt", "^NL^", 1)
EndForEach
#CabsAuto Install
RunWait("\Storage Card\ReLoad\Bin\AutoRun.exe")
#CabsManual Install
ForEach x in files { "\Storage Card\ReLoad\CabsManual\*.cab" }
RunWait(x)
EndForEach
If (FileExists("\Storage Card\ReLoad\Backup.zip") )
#Restore files from zip to main storage
UnzipAll("\Storage Card\ReLoad\Backup.zip", "")
EndIf
If (FileExists("\Storage Card\ReLoad\SDBackup.zip") )
#Restore files from zip2 to storage card
UnzipAll("\Storage Card\ReLoad\SDBackup.zip", "\Storage Card\")
EndIf
KillScript("\Storage Card\ReLoad\Bin\Message_Running.mscr")
If(Question("Finished ReLoading.^NL^Do you want to reset?", "Reload 0.2", "YesNo")="No")
Exit
EndIf
Reset
Very good soft, it works nice !!
The only difficulty for the french users is to replace in the script "Storage Card" by "Carte de stockage"
Thx men for this !!!
Nice soft,
I could use FAMAN WM6 on my trinity now !
French translation and modification is (seem to be) ok.
Just wait the OK from the boss and I'll give you !
Edit : Why don't you use the LOCK:Enabled in the header and LOCKDisabled on the end of the config file ? Thxs in advance.
I use SettingsSavior on my Trinity mainly for its similar auto-install functionality
Hello,
Thank you for this very useful tool
My .cab are removed after using Reload. How can I keep my .cab on my SD after a new installation ?
Thank you for your help.
Guillaume
__________________
SPV M700
FAMAN 4.03.FR
1.50.08.11
2.79.7020.19H
can this software reinstall cabs, copy skin files in programs installation directory (eg pocketcm skin) and reconfigure mail and exchange accounts ?
OOPS delete this post.

OziExplorerCE: Registration key reset turning off the GPS

Hello,
I installed OziCe in my GPS Invion (wince 4.2 loaded from SD card). It
works fine but, every time I turned on the GPS, OziCE asks to re-enter
the registration code. All the other configuration are correctly
reloaded, togheter with last used map.
No problem exiting and restarting OziCE, when the GPS remains active.
It seems that OziCE saves the registration code in same 'volatile'
memory, not flashed at hard shutdown.
I tried to check the registry, comparing them with remote tools before
and after starting OziCE, but I foung nothing.
Does anyone know a way to solve or workaround the problem?
Thanks, Filippo
Found a solution
Hello,
for who may be intersted, I found a way to workaround the issue writing a MortScript (download the interpreter and instructions from http://www.sto-helit.de/).
This is the script I wrote; obviously you have to change the OziCE username and password and the path to OziExplorerCE.exe.
After insatalled and registered MortScript, copy the script in a .mscr file in the device. Executing the script would start OziCE inserting the registration code (if needed).
Ciao.
#OZI CE start
regName = "MyOZICeUserName"
regKey = "MyOZICeRegistrationCode"
WindowTitle="Inserisci Codice di Registrazione"
EngWindowTitle="Enter Registration Code"
OKWindow="OziExplorer"
ozipath = "\SDMMC DISK\WINCE\programfile\ozi_1.12.3\COMMON\OziExplorerCE.exe"
nLoops = 200
Run(ozipath )
#WaitFor(WindowTitle, 5) #returns timeout error if not found...
i=0
While ((ActiveWindow() ne WindowTitle AND ActiveWindow() ne EngWindowTitle) && i<nLoops)
Sleep(50)
i=i+1
EndWhile
if (WndActive(WindowTitle)=1 OR WndActive(EngWindowTitle)=1)
actWin = ActiveWindow()
SendKeys(actWin, regName)
SendTab(actWin)
SendKeys(actWin, regKey)
SendCR(actWin)
#WaitFor(OKWindow, 5)
i=0
While (ActiveWindow() ne OKWindow && i<nLoops)
Sleep(50)
i=i+1
EndWhile
if (WndActive(OKWindow)=1)
SendOK(OKWindow)
EndIf
EndIf
using mortscript to enter OZICe on a windows CE 4.2 device
Filippo, nice work!
That mortscript you wrote works a treat on my navigation box.
I was unable to work out how to do a cab instal of mortscript. My navigation box won't start .cab files. So I need to run the bin:version of mortscript first for the Device binaries (whatever that means) and then I can run your mortscript. Love watching mortscript typing in my name and code.
OziCe now asks for ECW.dll - where does that file come from and where should it be? in windows? in storage card root? in oziexplorer folder on storage card? in nandflash?
OziExplorerCE: Preventing registration key reset turning off the GPS
Please apologize warming up this thread, but thought I'ld share my solution here.
1. OziExplorer stores user-registration data in file named 'gihobj.dll' in OS's folder \Windows.
2. Hence you backup once this 'gihobj.dll' , then always copy it to \Windows before you start OzExplorer.
I suggest to use a wrapper script as following to start OziExplorer:
Code:
#OziExplorer Launcher
#This script must be located in OziExplorer's installation folder
#or you have to alter the OziExplorer 'ozipth' below!
Local()
ozipth=SystemPath("ScriptPath")
oziexpl="OziExplorerCE.exe"
regdata="gihobj.dll"
winregfile="\Windows\"&regdata
bkupregfile=ozipth\regdata
#check existence of registration data
If(FileExists(winregfile))
#OK, run OziExplorer
Run(ozipth\oziexpl)
ElseIf(FileExists(bkupregdata))
#OK, but in wrong folder, hence copy registration
#data to \Windows, then run OziExplorer
Copy(bkupregdata,winregdata,1)
#wait max. 2 secs
cnt=0
While((NOT FileExists(winregdata))&&(cnt<20))
cnt+=1
Sleep 100
EndWhile
Run(ozipth\oziexpl)
Else
#not OK, hence start OziExplorer with entering user-registration data
RunWait(ozipth\oziexpl)
#backup OziExplorer's registration data
If(FileExists(winregdata))
Copy(winregdata,bkupregdata,1)
EndIf
EndIf
HTH
OziExplorerCE: Preventing registration key reset turning off the GPS
Hello,
I have an old pda with WindowsCE 2002 installed.
Can everyone drive me applying the suggest of jwoegerbauer?
I can't find the file 'gihobj.dll' I think because I don't see the hidden files so:
1. how can I see the hidden files.
2. how can I create the script file? is it a batch file?
many thanks at all,
mimmolo
mimmolo said:
Hello,
2. how can I create the script file? is it a batch file?
mimmolo
Click to expand...
Click to collapse
All you need is MortScript: http://www.sto-helit.de/index.php?module=page&entry=ms_overview&action=view&menu=29

Back door on magellan triton

After successfully accessing file system on magellan triton 1500 described on http://tritonforum.com/forum/viewtopic.php?f=6&t=1289 i install OziCe (pna version) on it and it's working fine, but there is big problem. In Triton system core is missing soft keyboard so there is no way to register Ozice. I researched a bit and after comparing files and registry on triton and my ipaq i found that on triton is missing file softkb.dll in windows directory and also there is no registry entry like in my ipaq HKLM\\Drivers\BuiltIn\sip\ for activation of softkeybord on system startup.
So my question is if i just copy softkb.dll to windows directory on my triton an if i add entry in registry like on ipaq would that be enough to activate soft keybord?
Also does anybody know how to make backup of triton registry. I try with TRE and regedit but option export registry on both programs is not working.
tenx...
After one day of researching:
I was able to copy softkb.dll to windows directory of my triton but was unable to add entry in registry for SIP. Because there is no keybord only way to enter something into registry is to create .reg file and import that via registry editor. I extract reg key from my ipaq and try with 3 different registry editors to import it into triton registry but without success...
Unfortunately i haven't got a clue what you are adressing to here, but maybe this suggestion might help you?
How about you install something like 'Soti PocketController', or any other tool that let's you control your device through a PC (or mac for that matter) to enable your PC-keyboard as text-input?
Hope this helps!! Good luck!

Create a single cab out of multiple reg entries

Hey guys, I'd like to combine all my registry edits in to 1 single installable cab file. How can I do this? I have several regedits eg:
[HKEY_LOCAL_MACHINE\ControlPanel\Pen]"Hide"=dword:0
HKCU\ControlPanel\Keybd and change DeviceLockWhenSuspend to 0
HKEY_LOCAL_MACHINE\System\StorageManager\FATFS and Change - CacheSize to 4096
As you can see, they are stored in my list of tweaks in plain English.. how can I make a properly formatted list of all of them and then make a cab that will install to my PPC and change all the appropriate reg entries.
Thanks in advance!
the7thson said:
Hey guys, I'd like to combine all my registry edits in to 1 single installable cab file. How can I do this? I have several regedits eg:
[HKEY_LOCAL_MACHINE\ControlPanel\Pen]"Hide"=dword:0
HKCU\ControlPanel\Keybd and change DeviceLockWhenSuspend to 0
HKEY_LOCAL_MACHINE\System\StorageManager\FATFS and Change - CacheSize to 4096
As you can see, they are stored in my list of tweaks in plain English.. how can I make a properly formatted list of all of them and then make a cab that will install to my PPC and change all the appropriate reg entries.
Thanks in advance!
Click to expand...
Click to collapse
google ceregeditor. It will turn registry entries into a cab for you.
mwalt2 said:
google ceregeditor. It will turn registry entries into a cab for you.
Click to expand...
Click to collapse
Yes I actually am using ceregeditor. I can turn a single reg entry into a cab but I'm not sure how I can make a collection of regedits in to one cab file using that software. Could you point me in the right direction?
the7thson said:
Yes I actually am using ceregeditor. I can turn a single reg entry into a cab but I'm not sure how I can make a collection of regedits in to one cab file using that software. Could you point me in the right direction?
Click to expand...
Click to collapse
Just place your regedits in a text file and save it as something like filename.reg. Then open the reg file with ceregeditor and use the convert to cab option. Make sure your reg file is in the proper format (like what you get if you export the registry keys).
So:
Code:
REGEDIT4
[HKEY_LOCAL_MACHINE\ControlPanel\Pen]
"Hide"=dword:0
etc
etc
mwalt2 said:
Just place your regedits in a text file and save it as something like filename.reg. Then open the reg file with ceregeditor and use the convert to cab option. Make sure your reg file is in the proper format (like what you get if you export the registry keys).
So:
Code:
REGEDIT4
[HKEY_LOCAL_MACHINE\ControlPanel\Pen]
"Hide"=dword:0
etc
etc
Click to expand...
Click to collapse
Excellent, thank you!! I will try this out tonight.
Also - is there any way I can DELETE any existing reg entries using this method?
And then I assume I can create new entries using this method also?
Thanks again.
the7thson said:
Excellent, thank you!! I will try this out tonight.
Also - is there any way I can DELETE any existing reg entries using this method?
And then I assume I can create new entries using this method also?
Thanks again.
Click to expand...
Click to collapse
I'm not sure about using this in a cab, but using .reg files, is possible to delete Keys(including SubKeys and Values) or just a specific Value from a Key.
Consider the following registry entry as an example:
[HKEY_LOCAL_MACHINE\ControlPanel\Pen]
"Hide"=dword:0
To delete a Key create a reg file with the following:
Code:
REGEDIT4
[COLOR=seagreen][B][[COLOR=red]-[/COLOR]HKEY_LOCAL_MACHINE\ControlPanel\Pen][/B][/COLOR]
To delete a Value from a Key create a reg file with the following:
Code:
REGEDIT4
[COLOR=seagreen][HKEY_LOCAL_MACHINE\ControlPanel\Pen][/COLOR]
[B][COLOR=royalblue]"Hide"=[/COLOR][COLOR=red]-[/COLOR][/B]
Thanks to Mr. Makk and his tutorials thread for the Value delete (I was only aware of the Key delete from analysing RGUs)
Cheers,
FInixNOver
FInixNOver said:
I'm not sure about using this in a cab, but using .reg files, is possible to delete Keys(including SubKeys and Values) or just a specific Value from a Key.
Consider the following registry entry as an example:
[HKEY_LOCAL_MACHINE\ControlPanel\Pen]
"Hide"=dword:0
To delete a Key create a reg file with the following:
Code:
REGEDIT4
[COLOR=seagreen][B][[COLOR=red]-[/COLOR]HKEY_LOCAL_MACHINE\ControlPanel\Pen][/B][/COLOR]
To delete a Value from a Key create a reg file with the following:
Code:
REGEDIT4
[COLOR=seagreen][HKEY_LOCAL_MACHINE\ControlPanel\Pen][/COLOR]
[B][COLOR=royalblue]"Hide"=[/COLOR][COLOR=red]-[/COLOR][/B]
Thanks to Mr. Makk and his tutorials thread for the Value delete (I was only aware of the Key delete from analysing RGUs)
Cheers,
FInixNOver
Click to expand...
Click to collapse
Wow, thank you!!!
Is there any program that will allow multiple REG sections to all be exported to a single "file.reg" so that they can all be reloaded or converted to a CAB install file? I have multiple sections of my Registry which i would like to have in a single .REG or .CAB file but when i export each part of the REG separately then cut n paste to combine then it does not seem to re-install in to my register after a clean ROM boot.
Any ideas?
LOL!
Use WinCe Cab Manager.
Make New Cab, and then import all your reg's into single cab.
If you want to export all regs, just use export function.
If you want edit your entries, you can edit their right there.
the7thson said:
Hey guys, I'd like to combine all my registry edits in to 1 single installable cab file. How can I do this? I have several regedits eg:
[HKEY_LOCAL_MACHINE\ControlPanel\Pen]"Hide"=dword:0
HKCU\ControlPanel\Keybd and change DeviceLockWhenSuspend to 0
HKEY_LOCAL_MACHINE\System\StorageManager\FATFS and Change - CacheSize to 4096
As you can see, they are stored in my list of tweaks in plain English.. how can I make a properly formatted list of all of them and then make a cab that will install to my PPC and change all the appropriate reg entries.
Thanks in advance!
Click to expand...
Click to collapse
See my signature
Magic Tweaks is exactly what you need with alot more Regs
Ethermind said:
LOL!
Use WinCe Cab Manager.
Make New Cab, and then import all your reg's into single cab.
If you want to export all regs, just use export function.
If you want edit your entries, you can edit their right there.
Click to expand...
Click to collapse
Yeah, use wince cab manager! Just add a key to the registry or use file, import reg!
When you want to save the cab you'll get a message that you don't added any files, thats oke because a key or a value isn't a file!

Categories

Resources