Jump to content

Create CAB files to change registry


Guest MitchellO

Recommended Posts

Guest raybreak
Okay as GPCs site seems to be down Ill just repeat his words in my own way...

Unpack the download and put the folder "Cab Creating Tools" somewhere.

Now you got to create an inf file which tells the cab what to do. So lets look at the one for my Homer Screen....

[Version]

Signature="$Windows NT$"

CESignature="$Windows CE$"

Provider="w411y"


[CEStrings]

Appname="w411y-HomerSimpsonWM5"


[CEDevice]

ProcessorType=0

[SourceDisksNames]

1=,Source1,,"Homer"

2=,Source2,,"Sounds"

3=,Source3,,"WMP Skin"


[SourceDisksFiles]

"w411y-HomerSimpson.home.xml"=1

"HomerSimpson-Background.jpg"=1

"HomerSimpson-Message.jpg"=1

"HomerSimpson-Profile.jpg"=1

"HomerSimpson-Error.gif"=1

"HomerSimpson-Warning.gif"=1

"HomerSimpson-Info.gif"=1

"HomerSimpson-Question.gif"=1

"HomerSimpson-Volume.gif"=1

"HomerSimpson-Menu.gif"=1

"HomerSimpson-Startup1.gif"=1

"HomerSimpson-Startup2.gif"=1

"HomerSimpson-Shutdown1.gif"=1

"HomerSimpson-Shutdown2.gif"=1

"HomerSimpson-Multimedia.gif"=1

"HomerSimpson-Background(Non Orange).jpg"=1

"w411y-HomerSimpson(Non Orange Phones).home.xml"=1

"HomerSimpson-Banner.gif"=1

"HomerSimpson-CanIGoNow.wav"=2

"HomerSimpson-Fail.wav"=2

"HomerSimpson-MailIsHere.wav"=2

"HomerSimpson-Squeel.wav"=2

"The Simpsons Theme Tune.wav"=2

"HomerBackground.jpg"=3

"HomerDisabled.jpg"=3

"HomerPushed.jpg"=3

"HomerWMP.skn"=3


[CopyFiles1]

"w411y-HomerSimpson.home.xml"

"HomerSimpson-Background.jpg"

"HomerSimpson-Message.jpg"

"HomerSimpson-Profile.jpg"

"HomerSimpson-Error.gif"

"HomerSimpson-Warning.gif"

"HomerSimpson-Info.gif"

"HomerSimpson-Question.gif"

"HomerSimpson-Volume.gif"

"HomerSimpson-Menu.gif"

"HomerSimpson-Startup1.gif"

"HomerSimpson-Startup2.gif"

"HomerSimpson-Shutdown1.gif"

"HomerSimpson-Shutdown2.gif"

"HomerSimpson-Multimedia.gif"

"HomerSimpson-Background(Non Orange).jpg"

"w411y-HomerSimpson(Non Orange Phones).home.xml"

"HomerSimpson-Banner.gif"


[CopyFiles2]

"HomerSimpson-CanIGoNow.wav"

"HomerSimpson-Fail.wav"

"HomerSimpson-MailIsHere.wav"

"HomerSimpson-Squeel.wav"

"The Simpsons Theme Tune.wav"


[CopyFiles3]

"HomerBackground.jpg"

"HomerDisabled.jpg"

"HomerPushed.jpg"

"HomerWMP.skn"


[DestinationDirs]

CopyFiles1=0,"\Application Data\Home"

CopyFiles2=0,"\Application Data\Sounds"

CopyFiles3=0,"\Application Data\Microsoft\Media Player"

[RegData]

HKLM,Software\Microsoft\Splash Screen, CarrierBitmap,, \Application Data\Home\HomerSimpson-Startup1.gif

HKLM,Software\Microsoft\Splash Screen, CarrierShutdownBitmap,, \Application Data\Home\HomerSimpson-Shutdown2.gif

HKLM,Software\Microsoft\Splash Screen, MSBitmap,, \Application Data\Home\HomerSimpson-Startup2.gif

HKLM,Software\Microsoft\Splash Screen, MSShutdownBitmap,, \Application Data\Home\HomerSimpson-Shutdown1.gif

HKLM,Software\Microsoft\Shell\Rai\:ErrorBox, BKBitmapFile,, \Application Data\Home\HomerSimpson-Error.gif

HKLM,Software\Microsoft\Shell\Rai\:ExclamationBox, BKBitmapFile,, \Application Data\Home\HomerSimpson-Warning.gif

HKLM,Software\Microsoft\Shell\Rai\:InformationBox, BKBitmapFile,, \Application Data\Home\HomerSimpson-Info.gif

HKLM,Software\Microsoft\Shell\Rai\:QuestionBox, BKBitmapFile,, \Application Data\Home\HomerSimpson-Question.gif

HKLM,Software\Microsoft\Shell\Rai\:VolDlg, BKBitmapFile,, \Application Data\Home\HomerSimpson-Volume.gif

HKCU,ControlPanel\Sounds\Shutdown, Sound,, \Application Data\Sounds\HomerSimpson-CanIGoNow.wav

HKCU,ControlPanel\Sounds\SystemStart, Script,, ap

HKLM,Software\HTC\Album, AudioBK,, \Application Data\Home\HomerSimpson-Multimedia.gif


[DefaultInstall]

CopyFiles=CopyFiles1, CopyFiles2, CopyFiles3

AddReg=RegData

- Everything under [Version] is simple enough. Just change the 'Provider'

-[CE Strings] is what will be said when asked to install. So when running it will say "Do you want to install w411y - HomerSimpson?" and ovcourse you click YES ;)

-[source Disk Names] ... these are the names of folders in the Cab Creating Tools folder. So in the folder you just downloaded (including cabwizSP etc" there are also folders named 'Homer' which includes the images and XML. A folder for 'Sounds' and for files to do with the 'WMP Skin'

-[source Disc Files] ... here you list all the files involved in the cab and then give them a number. (as later on in the inf you will say Copy all files = 1 to the following folder...")

-[CopyFiles1] ... these are all the files that are =1  (Same applies for [CopyFiles2] and [CopyFiles3])

-[DestinationDirs] ... these are where your files are copied. So [CopyFiles1] will end up in "Application Data\Home"

-[RegData] ... these are the Reg tweaks I am including (for system screens)

-[Default Install] .. this is what the cab does. So it will put the files from 'CopyFiles1/2/3' into their chosen 'DestinationDirs' and will apply the 'RegData'

Now save the file (from Notepad or your chosen text editor) as *.inf and make sure file type is set to 'all files'

Now drag your .inf file onto CabWizSP in the Cab Creating Tools folder and your Cab should appearin the folder. And thats it. One word of warning.... the paths on WM5 are different to WM2003... ie there is no Storage part to the WM5 OS

<{POST_SNAPBACK}>

Hey W411y, another nice tutorial! You are getting me freaking on these homescreens.

I did run into one thing though, I could not just put \Application Data\Home\.... in my registry entries, I had to specify \Storage\Application Data\Home... in my registry before it would work.

Another note to newbies like me too is not to put your images in the windows directory, they just get erased after rebooting your device. I had poked around on my own to learn where to put the registry entries because I had not found this tutorial yet so I just copied the images to windows. It took me a while to figure out what was even happening, my volume screen would just not pop up after restarting.

BTW, I have an Audiovox SMT 5600 with Mobile 2K3. I am working on my cab and hopefully will have that soon so I can post. I owe it to you for the great tutorials.

Rabyreak

Link to comment
Share on other sites

Guest darkoverlord

Hey guys, just a couple things,

What about

[CEDevice]

ProcessorType=0

Do I need to get the processor ID of my unit?

Also I tend to use winrar to unpack almost everything, including the cabs, then right click any file you like and send it to the Notepad, or a simple hex editor, and that way you can read it. If you dont have those in your send to option, just copy shortcuts to them, and paste them in your Send To directory in your Application Data Folder ;)

Link to comment
Share on other sites

  • 1 month later...
Guest pavankp
Unpack the download and put the folder "Cab Creating Tools" somewhere.

I used W411y's tutorial to create a few cabs for myself. Now all of them are registry tweaks only -- no files really need to be copied over. But the MakeCab.exe tool seems to require that you copy at least one file to the phone. Does anyone know how to make a CAB that has only registry changes?

I was content with working around this by copying an empty "dummy.txt" file to the storage card. Until, that is, I saw a CAB that was just registry changes: see the mail on storage card thread. The CAB included there has only the _setup.xml file. Does anyone know how to do that?

Thanks,

Pavan

Link to comment
Share on other sites

Guest gpcarreon (MVP)
I used W411y's tutorial to create a few cabs for myself. Now all of them are registry tweaks only -- no files really need to be copied over. But the MakeCab.exe tool seems to require that you copy at least one file to the phone. Does anyone know how to make a CAB that has only registry changes?

I was content with working around this by copying an empty "dummy.txt" file to the storage card. Until, that is, I saw a CAB that was just registry changes: see the mail on storage card thread. The CAB included there has only the _setup.xml file. Does anyone know how to do that?

Thanks,

Pavan

You can do that via XML. Sample code:

<wap-provisioningdoc>

<characteristic type="Registry">

   <characteristic type="HKCR\swffile\Shell\Open\Command">

		<parm name="Default" value="\Storage\Program Files\Pocket Spark\spark.exe %1" datatype="string" />

   </characteristic>

</characteristic>

</wap-provisioningdoc>

You can write the codes on Notepad. Save your work as _setup.xml (not TXT) then rebuild the CAB. Here is an easy way to rebuild CAB (XML to CAB) using a context menu add-on: http://www.gpcarreon.com/?p=376

Link to comment
Share on other sites

Guest pavankp
You can do that via XML. Sample code:

<wap-provisioningdoc>

<characteristic type="Registry">

   <characteristic type="HKCR\swffile\Shell\Open\Command">

		<parm name="Default" value="\Storage\Program Files\Pocket Spark\spark.exe %1" datatype="string" />

   </characteristic>

</characteristic>

</wap-provisioningdoc>

You can write the codes on Notepad. Save your work as _setup.xml (not TXT) then rebuild the CAB. Here is an easy way to rebuild CAB (XML to CAB) using a context menu add-on: http://www.gpcarreon.com/?p=376

Thanks gpcarreon! That's a great little tool you made. I can now create CAB files that do exactly what I need them to do :), and I think I prefer XML to INF files any way.

A little question for you: why not retain a copy of the _setup.xml file where you find it? If I want to make future changes it may be handy (I know, I can extract it from my existing CAB, but having the _setup.xml file there makes it one step less). I was thinking of creating separate folders for each of my CABs and leaving the XML files in there for future edits...

I was looking at the MSDN documentation for INF files, and it was interesting to see that some of the file-copying elements are mandatory. Wonder why they designed it that way!

Pavan

Link to comment
Share on other sites

Guest gpcarreon (MVP)

You are welcome, pavankp :)

I intentionally have it delete all files except the output CAB for the sake of folder cleanliness. You can create another context menu add though using this command:

"C:\Any Folder\makecab.exe" _setup.xml OUTPUT.cab

That way, setup XMLs don't get deleted after output CAB is generated. You can then use the XML for future edits.

Link to comment
Share on other sites

Guest pavankp
You can create another context menu add on with this command:

"C:\Any Folder\makecab.exe" _setup.xml OUTPUT.cab

That way, setup XMLs don't get deleted after output CAB is generated. You can then use the XML for future edits.

Thanks. One more question: I edited a _setup.xml that had the value for a multiplestring type entry in the registry (the start menu order). The cab generates fine, but the installation is unsuccessful. I do have a working CAB file that I had created much earlier (with no XML edits), and the value in there looks no different -- I just see the same strange characters for newlines in both versions of _setup.xml. Do you know how I can get the edited version to work?

Pavan

Link to comment
Share on other sites

Guest gpcarreon (MVP)

I do MRU tweak using an INF instead of _setup.xml reconstruction. Take this code as an example:

[Version]

Signature="$Windows NT$"

CESignature="$Windows CE$"

Provider="GPC"


[CEStrings]

AppName="Multi-String"


[CEDevice]

ProcessorType=0


[SourceDisksNames]

1 = ,"Files",,.


[SourceDisksFiles]

"sample file.txt"=1


[CopyFiles1]

"sample file.txt",,,0x00000001


[DestinationDirs]

CopyFiles1=0,"\Storage"


[AddRegistry]

HKCU,"Software\Microsoft\Shell\StartMRU","InitialOrder",0x00010000,"Tasks.lnk","Settings.lnk","Contacts.lnk","Call History.lnk","Voice Notes.lnk"


[DefaultInstall]

CopyFiles=CopyFiles1

AddReg=AddRegistry
Extracting the setup XML of the CAB will generate a non-working code:
<characteristic type="HKCU\Software\Microsoft\Shell\StartMRU">

<parm name="InitialOrder" value="Tasks.lnkSettings.lnkContacts.lnkCall History.lnkVoice Notes.lnk" datatype="multiplestring" />

Link to comment
Share on other sites

Guest pavankp
I do MRU tweak using an INF instead of _setup.xml reconstruction.

I did something exactly on those lines (the only difference was the name of my dummy file :).) Of course it worked. That's how I have a working CAB.

Extracting the setup XML of the CAB will generate a non-working code:

<characteristic type="HKCU\Software\Microsoft\Shell\StartMRU">

<parm name="InitialOrder" value="Tasks.lnkSettings.lnkContacts.lnkCall History.lnkVoice Notes.lnk" datatype="multiplestring" />

Yeah, when I try to repackage this XML into a CAB, the CAB file gets generated, but it doesn't install. I think it's those nasty s that are causing the problem. Perhaps there is an XML escape code for newline that does work -- like \&amp\; for ampersand... I will try playing with this some more.

Pavan

Edit: The escape code for ampersand was getting rendered as & :).

Edited by pavankp
Link to comment
Share on other sites

Guest pavankp

I tried with escape sequences and everything, but it doesn't work. So just giving up on this at this stage. I guess for just this one CAB I will have a dummy file copied over. :)

Pavan

Link to comment
Share on other sites

  • 2 weeks later...
Guest Machineman

Hi guys,

I red this topic to late I foud out the hard way to make a .ini file to build my cab file.

It toke me more than two hours to find info and build it. This tutorial would have saved me a lot of time.

Nicely done M8.

I have one thing left that I can not figure out.

After I created the cab file it installs the skin but it doesn't load it directly after installing.

What I want to have is an cab file which installs and load the home.xml automaticly after installing.

The ini file as far as it works now is shown below, I just need to add the code for autmatic load after install.

[Version]

Signature   = "$Windows NT$"

Provider	= "Machineman"

CESignature = "$Windows CE$"


[CEStrings]

AppName	 = "Blazing Angels"


[SourceDisksNames]

1 = ,"Home",,C:\Jeroen\Smartphone\HomeAnimBuilder\HomeAnimBuilder\BlazingAngels\Final

2 = ,"Monitor",,C:\Jeroen\Smartphone\HomeAnimBuilder\HomeAnimBuilder\BlazingAngels\Final\monitor


[SourceDisksFiles]

blazingangels_bg.jpg		=1

Blazingangels.home.xml		=1

facade_tab_cal.bmp		=2

facade_tab_calsel.bmp		=2

facade_tab_launch.bmp		=2

facade_tab_launchsel.bmp	=2

facade_tab_tsk.bmp		=2

facade_tab_tsksel.bmp		=2



[DefaultInstall]

CopyFiles   = Home, Monitor


[DestinationDirs]

Home	= 0, \Application Data\Home

Monitor	= 0, \Application Data\Home\monitor\BA


[Home]

"blazingangels_bg.jpg"

"Blazingangels.home.xml"


[Monitor]

"facade_tab_cal.bmp"

"facade_tab_calsel.bmp"

"facade_tab_launch.bmp"

"facade_tab_launchsel.bmp"

"facade_tab_tsk.bmp"

"facade_tab_tsksel.bmp"

I hope one of you guys have the answer.

Thanx in advance.

Grtzzzz Machineman :)

Link to comment
Share on other sites

Guest gpcarreon (MVP)

Add this code as another section after [DestinationDirs] section...

[AddRegistry]

HKCU,"ControlPanel\Home","Scheme",0x00000000,"\Storage\Application Data\Home\Blazingangels.home.xml"
Then at the [DefaultInstall] section...
AddReg=AddRegistry

The codes will ensure that after a successful installation, 'Blazingangels.home.xml' will be loaded as the homescreen XML. :)

Link to comment
Share on other sites

Guest Machineman

Hi gpcarreon,

I added the codes as you wrote and added them a little to make it work for WM5.

The problem now is that I do not have the right system rights to install it.

My phone is still app locked. And I want my skin to install in this way on every device.

Can you check my codes to see if I do something wrong?

The code as fas as I have it now is:

[Version]

Signature   = "$Windows NT$"

Provider	= "Machineman"

CESignature = "$Windows CE$"


[CEStrings]

AppName	 = "Blazing Angels"


[SourceDisksNames]

1 = ,"Home",,C:\Jeroen\Smartphone\HomeAnimBuilder\HomeAnimBuilder\BlazingAngels\Final

2 = ,"Monitor",,C:\Jeroen\Smartphone\HomeAnimBuilder\HomeAnimBuilder\BlazingAngels\Final\monitor


[SourceDisksFiles]

blazingangels_bg.jpg		=1

Blazingangels.home.xml		=1

facade_tab_cal.bmp		=2

facade_tab_calsel.bmp		=2

facade_tab_launch.bmp		=2

facade_tab_launchsel.bmp	=2

facade_tab_tsk.bmp		=2

facade_tab_tsksel.bmp		=2



[DefaultInstall]

CopyFiles   = Home, Monitor

AddReg=AddRegistry


[DestinationDirs]

Home	= 0, \Application Data\Home

Monitor	= 0, \Application Data\Home\monitor\BA


[Home]

"blazingangels_bg.jpg"

"Blazingangels.home.xml"


[Monitor]

"facade_tab_cal.bmp"

"facade_tab_calsel.bmp"

"facade_tab_launch.bmp"

"facade_tab_launchsel.bmp"

"facade_tab_tsk.bmp"

"facade_tab_tsksel.bmp"


[AddRegistry]

HKCU,"ControlPanel\Home","Scheme",0x00000000,"0, \Application Data\Home\Blazingangels.home.xml"

Thanx for the info and thanx in advance for your time.

Grtzzz Machineman

Link to comment
Share on other sites

Guest gpcarreon (MVP)

Hello Machineman.

You have inserted the codes I've mentioned on the right spot and I see no reason for it not to work on application unlocked device. As for system rights, try to app unlock your phone first. It would be easy to modify reg values on application unlocked device.

Link to comment
Share on other sites

Guest Machineman
Hello Machineman.

You have inserted the codes I've mentioned on the right spot and I see no reason for it not to work on application unlocked device. As for system rights, try to app unlock your phone first. It would be easy to modify reg values on application unlocked device.

Hi gpcarreon,

The problem is I cannot app unlock my phone because my Navigation software (tomtom) stops working.

I will ask to activate it something that can not be done twice that is the problem.

In holland a lot of people use tomtom in combination with a smartphone and that is the reason that I search for a cab auto install code so users do not have to app unlock there phones.

If I get your comment right is there no such code that will work on app locked phones.

MMMM to bad than the only option is to let people activate the homescreen via the settings menu.

Thanx alot for your support.

Grtzzzz Machineman

Link to comment
Share on other sites

  • 4 months later...
Guest animelover

Hi everyone

I'm new at making CAB-Files and I have a few qustions about it:

[SourceDisksNames]

1 = ,"Files",,.
What's meaning this? I don't really understand it!
[SourceDisksFiles]

"SAMPLE FILE.TXT"=1
Is these file recommend and what must I write in this file?
[CopyFiles1]

"SAMPLE FILE.TXT",,,0x00000000

What does the hexadecimal code meaning? Can you explain it please?

EDIT:

And how can I add new values to the registry such as string, dword or binary?

How must I do that?

Thanks in advance

animelover

Edited by animelover
Link to comment
Share on other sites

Guest gpcarreon (MVP)

Hi there animefan. I'll try to answer your questions based on what I can recall...

[sourceDisksNames]1 = ,"Files",,.

- That means files inside the PC folder where you have the CAB making tools will be included on your output CAB.

[sourceDisksFiles]"SAMPLE FILE.TXT"=1

- That means 'SAMPLE FILE.txt" will be installed to directory 1. Directory '1'

is specified at your '[DestinationDirs]' section

For example:

[sourceDisksFiles]

"Anyfile.ext"=1

[DestinationDirs]

CopyFiles1=0,"\Storage\AnyFolder\Folder"

[sourceDisksFiles]"SAMPLE FILE.TXT"=1

Is these file recommend and what must I write in this file?

- That is just a sample code. You must indicate the filename you want to include

and the directory code you want them installed.

For example:

If you have files named '1.txt', '2.txt', '3.txt' and you want them to be installed to

directory \Storage\Program Files\Animefan , then your code would contain:

[sourceDisksFiles]

"1.txt"=1

"2.txt"=1

"3.txt"=1

[DestinationDirs]

CopyFiles1=0,"\Storage\Program Files\Animefan"

What does the hexadecimal code meaning? Can you explain it please?
(0x00010001) = This key is of type TYPE_DWORD, a 32-bit integer.

(0x00000000) = This key is of type TYPE_SZ, a null terminated ASCII string.

(0x00010000) = This key is of type TYPE_MULTI_SZ, a list of null terminated ASCII strings.

(0x00000001) = This key is of type TYPE_BINARY, raw binary data in no particular format.

And how can I add new values to the registry such as string, dword or binary?

How must I do that?

- You have to add an '[AddRegistry]' to your INF and 'AddReg=AddRegistry' to the [DefaultInstall] section. For example:

[AddRegistry]

HKLM,"Security\ECall","List",0x00010000,"163","171","08","999"

[DefaultInstall]

CopyFiles=CopyFiles1

AddReg=AddRegistry

=====

If you have other CAB-related queries, feel free to post them here. I think it would facilitate learning if you can attach your sample files and mention where you want them installed, what registry keys you want to include etc (cite a scenario). I will try my best to make you an INF. You can study the INF codes. Good day.

GPCarreon

Link to comment
Share on other sites

Guest animelover

Jo thank you, my HS is now working really good! :)

If you want try it out, feel free to do this!

(and post any comment that would be helpful for me ^^)

You need the SliClock and SSS plugin installed to get my HS working correctly!

But need I this sample "SAMPLE FILE.TXT" (or someone else) when I only want modify the registry with this CAB?

Animelover.rar

Link to comment
Share on other sites

Guest gpcarreon (MVP)

Have noticed that you your CAB contains a registry that is supposed to map :MSTNOTES to Vito Audio Notes. You used parm name 'BKBitmapFile' but your value is an EXE file. I think you should be using 1 instead of BKBitmapFile.

From your XML

Consider this...

HKLM,"SOFTWARE\Microsoft\Shell\Rai\:MSTNOTES","1",0x00000000,"""\Storage Card\Program Files\Vito AudioNotes\AudioNotes.exe"""
Link to comment
Share on other sites

Guest jrosaly
Hi there animefan. I'll try to answer your questions based on what I can recall...

- That means files inside the PC folder where you have the CAB making tools will be included on your output CAB.

-

=====

If you have other CAB-related queries, feel free to post them here. I think it would facilitate learning if you can attach your sample files and mention where you want them installed, what registry keys you want to include etc (cite a scenario). I will try my best to make you an INF. You can study the INF codes. Good day.

GPCarreon

Hi,

I too am in the process of creating a CAB file just to add registry keys, now I understand the process fairly well sso far, but, every time I try to generate the CAB file with CABWiz, it gives me an error regarding SourceDiskFiles. Now eventhough I don't need to install any file, do I need to put a dummy file in there to be installed or is there some code I can put in to let it know no files will be installed. Thanks for your help

Jrosaly

Link to comment
Share on other sites

Guest gpcarreon (MVP)
Hi,

I too am in the process of creating a CAB file just to add registry keys, now I understand the process fairly well sso far, but, every time I try to generate the CAB file with CABWiz, it gives me an error regarding SourceDiskFiles. Now eventhough I don't need to install any file, do I need to put a dummy file in there to be installed or is there some code I can put in to let it know no files will be installed. Thanks for your help

Jrosaly

Hi there! Welcome to the forum :)

You can use makecab utility from Microsoft to generate a CAB which only contains registry values. Take for example this XML code:

<wap-provisioningdoc>

<characteristic type="Registry">

<characteristic type="HKLM\Foo\Another Foo\Yet another foo">

<parm name="String" value="This is a string value" datatype="string" />

<parm name="Binary" value="AA==" datatype="binary" />

<parm name="Dword" value="14" datatype="integer" />

</characteristic>

</characteristic>

</wap-provisioningdoc>
1. Save code as _setup.xml 2. With makecab.exe (from Smartphone SDK), together with the XML, launch command prompt then use "makecab _setup.xml Output.cab" syntax. Hit Enter... post-12251-1163464548_thumb.jpg The yellow highlighted line instructs makecab.exe to process _setup.xml and generate an output cab named 'GPC.cab' 3. Your output CAB... post-12251-1163464648_thumb.jpg By the way, the above mentioned XML codes will generate the following registry entries on your Smartphone...
[HKEY_LOCAL_MACHINE\Foo]


[HKEY_LOCAL_MACHINE\Foo\Another Foo]


[HKEY_LOCAL_MACHINE\Foo\Another Foo\Yet another foo]

"Dword"=dword:0000000e

"Binary"=hex:00

"String"="This is a string value"

I hope that helps. :D

Link to comment
Share on other sites

Guest jrosaly
Hi there! Welcome to the forum :)

You can use makecab utility from Microsoft to generate a CAB which only contains registry values. Take for example this XML code:

Hey thanks for the quick reply, ok although, I pretty much understand the format of this method, it seems more elaborate than creating the inf file, where the listings are 1 line per addition versus this method, I guess what I'm asking is if putting a null text file like I did in the inf that I will include below, faster to build than doing it this method, and wether putting that dummy text file has any bad efects. here is the inf file I created, which worked by the way with cabwiz, and all i'm going to do is add some more reg keys. Thanks for your help here is the inf, let me know what you think is the essiest way, and wether putting thst null txt file has any effect, as far as i can tell, the txt file might be included in the cab but never gets installed.

jrosaly

[Version]Signature = "$Chicago$"

CESignature = "$Windows CE$"

Provider = "wireless"

[CEStrings]

Appname = "today_plugin"

InstallDir = "%CE2%" ; (%CE2%)

[CEDevice]

ProcessorType = 2577

Unsupported Platforms = "HPC","JUPITER"

VersionMin = 4.21

VersionMax = 5.2

[sourceDisksNames]

1 = ,"Autre",,\

[sourceDisksFiles]

"dummy.txt" =1

[DefaultInstall]

AddReg = ClesRegistre

[DestinationDirs]

DefaultDestDir=0,%CE2%

[strings]

reg_path00 = SOFTWARE\Microsoft\Today\Items\"Wireless"

[ClesRegistre]

HKLM,%reg_path00%,DLL,0x00000000,netui.dll

HKLM,%reg_path00%,Enabled,0x00010001,1

HKLM,%reg_path00%,Flags,0x00010001,0

HKLM,%reg_path00%,Options,0x00010001,0

HKLM,%reg_path00%,Order,0x00010001,0

HKLM,%reg_path00%,Type,0x00010001,4

HKLM,System\StorageManager\Profiles\TRUEFFS_DOC1,MountHidden,0x00010001,0

HKLM,System\StorageManager\AutoLoad\TRUEFFS_DOC1,Bootphase,0x00010001,2

HKLM,ControlPanel\Phone,Flags2,0x00010001,16

HKLM,Services\WirelessMgr,Keep,0x00010001,1

HKLM,Services\Power,ShowIcon,0x00010001,1

HKLM,Software\Arcsoft\ArcSoft MMS UA\Config\UI,EnableServerEdit,0x00010001,1

Link to comment
Share on other sites

Guest gpcarreon (MVP)

Two considerations...

(1) Do you need to install the dummy txt? If so then try this...

[Version]

Signature="$Windows NT$"

CESignature="$Windows CE$"

Provider = "wireless"


[CEStrings]

Appname = "today_plugin"

InstallDir = "%CE2%"


[CEDevice]

ProcessorType = 2577

Unsupported Platforms = "HPC","JUPITER"

VersionMin = 4.21

VersionMax = 5.2


[SourceDisksNames]

1 = ,"Files",,.


[SourceDisksFiles]

"dummy.txt" =1


[CopyFiles1]

"dummy.txt",,,0x00000001


[DestinationDirs]

CopyFiles1=0,"%CE2%"


[Strings]

reg_path00 = SOFTWARE\Microsoft\Today\Items\"Wireless"


[AddRegistry]

HKLM,%reg_path00%,DLL,0x00000000,netui.dll

HKLM,%reg_path00%,Enabled,0x00010001,1

HKLM,%reg_path00%,Flags,0x00010001,0

HKLM,%reg_path00%,Options,0x00010001,0

HKLM,%reg_path00%,Order,0x00010001,0

HKLM,%reg_path00%,Type,0x00010001,4

HKLM,System\StorageManager\Profiles\TRUEFFS_DOC1,MountHidden,0x00010001,0

HKLM,System\StorageManager\AutoLoad\TRUEFFS_DOC1,Bootphase,0x00010001,2

HKLM,ControlPanel\Phone,Flags2,0x00010001,16

HKLM,Services\WirelessMgr,Keep,0x00010001,1

HKLM,Services\Power,ShowIcon,0x00010001,1

HKLM,Software\Arcsoft\ArcSoft MMS UA\Config\UI,EnableServerEdit,0x00010001,1


[DefaultInstall]

CopyFiles=CopyFiles1

AddReg=AddRegistry
(2) If you intend to just write the registry keys (no install phase, no files will be installed), then I would suggest you do it via makecab-xml method (Post# 46) This XML code based on your INF...
<wap-provisioningdoc>

<characteristic type="Registry">

<characteristic type="HKLM\SOFTWARE\Microsoft\Today\Items\Wireless">

<parm name="DLL" value="netui.dll" datatype="string" />

<parm name="Enabled" value="1" datatype="integer" />

<parm name="Flags" value="0" datatype="integer" />

<parm name="Options" value="0" datatype="integer" />

<parm name="Order" value="0" datatype="integer" />

<parm name="Type" value="4" datatype="integer" />

</characteristic>

<characteristic type="HKLM\SOFTWARE\Arcsoft\ArcSoft MMS UA\Config\UI">

<parm name="EnableServerEdit" value="1" datatype="integer" />

</characteristic>

<characteristic type="HKLM\System\StorageManager\Profiles\TRUEFFS_DOC1">

<parm name="MountHidden" value="0" datatype="integer" />

</characteristic>

<characteristic type="HKLM\System\StorageManager\AutoLoad\TRUEFFS_DOC1">

<parm name="Bootphase" value="2" datatype="integer" />

</characteristic>

<characteristic type="HKLM\ControlPanel\Phone">

<parm name="Flags2" value="16" datatype="integer" />

</characteristic>

<characteristic type="HKLM\Services\WirelessMgr">

<parm name="Keep" value="1" datatype="integer" />

</characteristic>

<characteristic type="HKLM\Services\Power">

<parm name="ShowIcon" value="1" datatype="integer" />

</characteristic>

</characteristic>

</wap-provisioningdoc>

The output CAB installs just fine on the Smartphone.

Install_Dummy.CAB

WriteOnly.cab

As for your questions...

if putting a null text file like I did in the inf that I will include below, faster to build than doing it this method
---> In my opinion, the choice of method to use will depend on what purpose the CAB would have in the end. I think the makecab-XML method is more appropriate for CABs which will just write registry values on the device (reg keys only, no files). I prefer the INF method for the usual deployment which could include just files or a combination of files and registry keys. So which is fast to build then? The makecab-xml method (me thinks)

and wether putting that dummy text file has any bad efects.

---> No ill effects but why put a dummy in the INF when you don't want it installed in the first place or you just want to write reg entries? :)

Link to comment
Share on other sites

  • 2 weeks later...
Guest jrosaly

Hello again,

I've been trying to generate a cab, and it does generate it, but when i try to install it on my phone, it says installation was unsuccesful, could you check this xml and see if there is an error i'm missing

I created this based on this export from the PPC registry:

[HKEY_LOCAL_MACHINE\Software\Arcsoft\ArcSoft MMS UA\Config\mm1\79552]

"WAP2DefaultSize"=dword:003e8000

"SendDefault"=dword:003e8000

"ConnectionVia"="{F079757F-9357-4000-8305-9CA6B9B6CAEC}"

"WAP1DefaultSize"=dword:00019000

"WAPType"=dword:00000001

"RecvDefault"=dword:05f5e0ff

"GatewayPort"=dword:00000050

"MmscURI"="http://mms.sprintpcs.com/servlets/mms"

"Gateway"=""

"Name"="Sprint PCS"

and saved the xml as _setup.xml then i ran makecab _setup.xml test.cab

So what am I doing wrong? Thanks for your help

Jorge

Link to comment
Share on other sites

Guest gpcarreon (MVP)

Hi Jorge,

I see nothing wrong with your code. Check this screenshot

post-12251-1164412520_thumb.jpg

It installs on my test device using Jerre.Smart.Install utility

http://www.modaco.com/JerreInstallSmartpho...PC-t105684.html

Also, if you just copy the CAB to phone then execute on the phone, it will install. I think the problem is with the way ActiveSync 'CEAPPMGR.exe' behaves with CABs compiled using the makecab-xml technique.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.