Jump to content


Create CAB files to change registry

- - - - -

69 replies to this topic

#1
MitchellO

MitchellO

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,122 posts
  • Location:Leonay, NSW
  • Devices:HTC Desire
How do you create cab files (like the one to move the IE Cache/Temp/History to SD) that add or change the registry? I just can't figure it out!


#2
gpcarreon (MVP)

gpcarreon (MVP)

    RN, MS MVP-MD

  • Members
  • PipPipPipPipPipPip
  • 4,528 posts
  • Location:Legazpi, Philippines
  • Devices:Cherry Mobile Eclipse
You need an INF then cabwizsp.exe, cabwiz.ddf, and makecab.exe. Check the sample INF below

[Version]
Signature="$Windows NT$"
CESignature="$Windows CE$"
Provider="YOUR NAME HERE"

[CEStrings]
AppName="APP NAME HERE"

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

[SourceDisksFiles]
"SAMPLE FILE.TXT"=1

[CopyFiles1]
"SAMPLE FILE.TXT",,,0x00000000

[DestinationDirs]
CopyFiles1=0,"\Storage"

[AddRegistry]
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Cache",0x00000000,"\Storage Card\Windows\Profiles\guest\Temporary Internet Files"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Cookies",0x00000000,"\Storage Card\Windows\Profiles\guest\Cookies"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","History",0x00000000,"\Storage Card\Windows\Profiles\guest\History"

[DefaultInstall]
CopyFiles=CopyFiles1
AddReg=AddRegistry

You should have 'SAMPLE FILE.TXT' together with the INF, cabwizsp.exe, cabwiz.ddf, and makecab.exe inside one folder then drag the INF to cabwizsp.exe to generate a CAB installer.

The main tweak is located at the '[AddRegistry]' section of the INF.

2425a96d204b681be05922b8a6b210c80f03f237

#3
rizzles

rizzles

    Enthusiast

  • Members
  • PipPipPip
  • 187 posts
is there anywhere that has a guide of how to do this??


#4
chucky.egg

chucky.egg

    Did I say that out loud?

  • MoDaCo Ad Free
  • PipPipPipPipPipPip
  • 4,724 posts
  • Location:Kent, England
  • Interests:Sleeping
  • Devices:Desire S
  • Twitter:@chucky_egg
You could start here:
MSDN

Edited by chucky.egg, 30 January 2006 - 01:24 PM.


#5
rizzles

rizzles

    Enthusiast

  • Members
  • PipPipPip
  • 187 posts
Hmmm looks a bit above my skills!!!


#6
w411y

w411y

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,516 posts
  • Location:Pontypridd, Wales
  • Devices:SPV M1500 & SPV C550
No Rizzles dont give up :)
MSDN scares me too. When I was first reading how to make a homescreen I was looking for the first corner I could go cry in!
Theres an insight to cab files here...
http://www.gpcarreon.com/?p=93

Basically a cab file can put files in a folder (ie// put an xml and .jpg into the Application Data\Home folder) and can also perform Reg tweaks (ie// system screens such as Start up screen and Shutdown screen)

All you have to do is make a .inf file. This basically tells the cab what to do. Hopefully the link above wil set you off. Good luck


#7
rizzles

rizzles

    Enthusiast

  • Members
  • PipPipPip
  • 187 posts
yeah i saw that link earlier but wont load up for me.. would really like to be able to get my head around it though...


#8
w411y

w411y

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,516 posts
  • Location:Pontypridd, Wales
  • Devices:SPV M1500 & SPV C550
Im just leaving but when Im on here next Ill post my inf file for my Homer Screen and give you a brief run through.


#9
Jamma14

Jamma14

    Addict

  • Members
  • PipPipPipPipPip
  • 863 posts
  • Location:Bath
  • Devices:T-Mo Dash
I tend to just edit the setup.xml files within cabs and then recompile/rezip/recab (not sure of the right word to use there) them. That way you can really see what's going on and it's quicker.

Just make sure you don't get lost in all the 's!


James

www.JammaSoft.tk

SPV e100 ----> i-mate sp3i ----> SPV c550 ----> T-Mobile Dash

#10
rizzles

rizzles

    Enthusiast

  • Members
  • PipPipPip
  • 187 posts

Jamma14, on Jan 30 2006, 18:59, said:

I tend to just edit the setup.xml files within cabs and then recompile/rezip/recab (not sure of the right word to use there) them. That way you can really see what's going on and it's quicker.

Just make sure you don't get lost in all the 's!
James

<{POST_SNAPBACK}>


Dont really understand any of that my knowledge on the subject is nout!!

Yeah cheers w411y would appreciate that


#11
Jamma14

Jamma14

    Addict

  • Members
  • PipPipPipPipPip
  • 863 posts
  • Location:Bath
  • Devices:T-Mo Dash

rizzles, on Jan 30 2006, 19:08, said:

Dont really understand any of that my knowledge on the subject is nout!!

Yeah cheers w411y would appreciate that

<{POST_SNAPBACK}>

Rizzles, I'd really recommend opening up a cab and looking at the _setup.xml.
I learned homescreen designing like that as well and making cabs is similar but much easier to accomplish.

Edited by Jamma14, 30 January 2006 - 07:17 PM.

www.JammaSoft.tk

SPV e100 ----> i-mate sp3i ----> SPV c550 ----> T-Mobile Dash

#12
rizzles

rizzles

    Enthusiast

  • Members
  • PipPipPip
  • 187 posts
I did have a look the other day but didnt really understand it.. thimk i need a guide for dummies!!


#13
rizzles

rizzles

    Enthusiast

  • Members
  • PipPipPip
  • 187 posts
where do i d/l all of this from??- cabwizsp.exe, cabwiz.ddf, and makecab.exe


#14
w411y

w411y

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,516 posts
  • Location:Pontypridd, Wales
  • Devices:SPV M1500 & SPV C550
You can download it from Microsfot in the SDK Deelopers kit but its quite a chunky download so Ill put the files you need in a rar. Give me 2 secs and Ill walk you through it. I need food first :)


#15
rizzles

rizzles

    Enthusiast

  • Members
  • PipPipPip
  • 187 posts

w411y, on Jan 31 2006, 15:52, said:

You can download it from Microsfot in the SDK Deelopers kit but its quite a chunky download so Ill put the files you need in a rar. Give me 2 secs and Ill walk you through it. I need food first :)

<{POST_SNAPBACK}>


Ok mate, cheers!!


#16
w411y

w411y

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,516 posts
  • Location:Pontypridd, Wales
  • Devices:SPV M1500 & SPV C550
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

Attached Files



#17
rizzles

rizzles

    Enthusiast

  • Members
  • PipPipPip
  • 187 posts
Cheers thanks for that... seems fairly easy after it has been explained. I'll give it a go and hopefully post my homescreen with a cab.

1 question: when you unistall the theme does it return the extra screens back to default???

Thanks for your help.. wouldnt even have a made a homescreen if it wasnt for your guide!! ;o)


#18
gpcarreon (MVP)

gpcarreon (MVP)

    RN, MS MVP-MD

  • Members
  • PipPipPipPipPipPip
  • 4,528 posts
  • Location:Legazpi, Philippines
  • Devices:Cherry Mobile Eclipse
Good work wally. =D>

2425a96d204b681be05922b8a6b210c80f03f237

#19
rizzles

rizzles

    Enthusiast

  • Members
  • PipPipPip
  • 187 posts
Yeah great work.... think you should start up your own "Guides for W411ies" business


#20
Jamma14

Jamma14

    Addict

  • Members
  • PipPipPipPipPip
  • 863 posts
  • Location:Bath
  • Devices:T-Mo Dash
Agreed, a good little tutorial, maybe you could add cab making into your pinned homescreen tutorial??

Jamma

Ps. @rizzles, not completely sure, but I believe they are returned to default.

www.JammaSoft.tk

SPV e100 ----> i-mate sp3i ----> SPV c550 ----> T-Mobile Dash




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users