[Question] Using DelFiles in an Addon pack

Discuss & post Update Pack addons here.
Post Reply
benners
Posts: 36
Joined: Mon Oct 10, 2005 5:29 pm

[Question] Using DelFiles in an Addon pack

Post by benners » Thu Jan 18, 2007 5:30 am

I have been working on an User Accounts addon pack similar to MrNxDmX and everything goes as expected except deleting the original user account pictures.

I have tried removing the entries from dosnet.inf and txtsetup.sif which was successful but the files were still installed I think due to shl_img.inf and so thought it would be easier to just let the files install then delete them. The inf file works within windows perfectly but the files are not deleted during the Windows install does anyone know what could be the problem?.

Code: Select all

[Version]
signature="$CHICAGO$"

[DefaultInstall]
OptionDesc = "Custom User Account Pictures"
Tip	   = "Custom Babe pics to replace the default ones"
Modes	   = 0,1,2,3
CopyFiles  = CUAP.Copy
DelFiles   = CUAP.Del

[Optional Components]
Benners_CUAP

[Benners_CUAP]
OptionDesc = "Custom User Account Pictures"
Tip	   = "Custom Babe pics to replace the default ones"
Modes	   = 0,1,2,3
CopyFiles  = CUAP.Copy
DelFiles   = CUAP.Del

[SourceDisksNames.x86]
1="CUAPics","CUAP.cab",,"i386"

[DestinationDirs]
DefaultDestDir = 16419,"Microsoft\User Account Pictures\Default Pictures"

[SourceDisksFiles]
1.bmp =1
2.bmp =1
3.bmp =1
4.bmp =1
5.bmp =1
6.bmp =1
7.bmp =1
8.bmp =1
9.bmp =1
10.bmp =1
11.bmp =1
12.bmp =1
13.bmp =1
14.bmp =1
15.bmp =1
16.bmp =1
17.bmp =1
18.bmp =1
19.bmp =1

[CUAP.Copy]
AmandaTapping.bmp,1.bmp
AngelinaJolie.bmp,2.bmp
CatherineBell.bmp,3.bmp
ClaireForlani.bmp,4.bmp
GiselleBunchen.bmp,5.bmp
JamiePressley.bmp,6.bmp
JenniferGarner.bmp,7.bmp
JenniferLoveHewitt.bmp,8.bmp
JeriRyan.bmp,9.bmp
JessicaAlba.bmp,10.bmp
KateBeckinsale.bmp,11.bmp
KellyHu.bmp,12.bmp
LucyLui.bmp,13.bmp
MonicaBellucci.bmp,14.bmp
NellMcAndrew.bmp,15.bmp
SalmaHayek.bmp,16.bmp
SofiaVergara.bmp,17.bmp
TyraBanks.bmp,18.bmp
VidaGuerra.bmp,19.bmp

[CUAP.Del]
airplane.bmp
astronaut.bmp
ball.bmp
beach.bmp
butterfly.bmp
car.bmp
cat.bmp
chess.bmp
dirt bike.bmp
dog.bmp
drip.bmp
duck.bmp
files.txt
fish.bmp
frog.bmp
guitar.bmp
horses.bmp
kick.bmp
lift-off.bmp
palm tree.bmp
pink flower.bmp
red flower.bmp
skater.bmp
snowflake.bmp

User avatar
MrNxDmX
Moderator
Posts: 3112
Joined: Mon Jan 03, 2005 7:33 am

Post by MrNxDmX » Thu Jan 18, 2007 6:28 am

You must define your paths correctly:

Under [DestinationDirs], you should have this, (you dont need DefaultDestDir as you didnt use it anywhere).

Code: Select all

[DestinationDirs]
CUAP.Copy = 16419,"Microsoft\User Account Pictures\Default Pictures"
Also, if you will delete those files, windows must know which folder it will lookup. For that, you must add this:

Code: Select all

CUAP.Del = 16419,"Microsoft\User Account Pictures\Default Pictures"
So, in final, your [DestinationDirs] section should look like this:

Code: Select all

[DestinationDirs]
CUAP.Copy = 16419,"Microsoft\User Account Pictures\Default Pictures"
CUAP.Del = 16419,"Microsoft\User Account Pictures\Default Pictures"
PS: (I would like to see your addon :P )

benners
Posts: 36
Joined: Mon Oct 10, 2005 5:29 pm

Post by benners » Thu Jan 18, 2007 7:46 am

Hi MrNxDmX thanks for the reply, I will change the value as you suggested and reinstall to see if this changes anything.

I thought that if I set

Code: Select all

DefaultDestDir = 16419,"Microsoft\User Account Pictures\Default Pictures"

I would only need to add the location once. I have been trying to read up on it and botch things until I get it right, this being my first creation and second addon :P and as I mentioned previously it works in Windows :?.

Here is the page where I read about the DefaultDestDir code. I will add my addon to this thread when I have tested it whether it works of not for your perusal, they are mainly faces of the celebs I quickly edited just to test, when the addon works I may find some better pics to edit.

User avatar
MrNxDmX
Moderator
Posts: 3112
Joined: Mon Jan 03, 2005 7:33 am

Post by MrNxDmX » Thu Jan 18, 2007 7:51 am

I took a look for that value on microsoft inf file directions, but that requires file-list-section that I havent used yet.

Waiting for your addon :P

Cheers

benners
Posts: 36
Joined: Mon Oct 10, 2005 5:29 pm

Post by benners » Thu Jan 18, 2007 11:38 am

Well I couldn't get it to work, I even copied a bmp over via $OEM$ to check whether they were being recreated after deletion but that file was also there. :cry:

Here is the pack for you MrNxDmX

User avatar
MrNxDmX
Moderator
Posts: 3112
Joined: Mon Jan 03, 2005 7:33 am

Post by MrNxDmX » Thu Jan 18, 2007 3:03 pm

It seems that your addon prepared perfect. But, IMO, your addon launching before windows created default user account pictures. I tried several files in that folder, and it deleted them. But, you are getting that error while windows setup. All I can say is that, you can use runonceEx for deleting them. Or sth else. Or hack dosnet.inf & txtsetup.sif or shl_img.inf file. Did you try editing shl_img.inf file,by removing those entries?

benners
Posts: 36
Joined: Mon Oct 10, 2005 5:29 pm

Post by benners » Thu Jan 18, 2007 3:50 pm

Nah I didn't try editing shl_img, I didn't know about it until I deleted the dosnet and txtsetup entries and the files still installed so I poked about abit and did some searching.

I figured having to edit 3 files, and the shl_img file is compressed, I don't know how to uncompress it then edit it, then compress it again via an addon so I would just try to delete them. Good point about my addon running before shl but I still can't delete the file I copy over myself, are the inf files processed alphabetically? 'cos I am gonna try and rename mine to z something and see if it makes a difference.

I'll be back.

User avatar
MrNxDmX
Moderator
Posts: 3112
Joined: Mon Jan 03, 2005 7:33 am

Post by MrNxDmX » Thu Jan 18, 2007 5:03 pm

Ok, its easy. Check this thread.It contains info for extracting & compressing again.
http://www.ryanvm.net/forum/viewtopic.php?t=2327

benners
Posts: 36
Joined: Mon Oct 10, 2005 5:29 pm

Post by benners » Thu Jan 18, 2007 5:09 pm

Bit of a miss communication I think :D , I know how to expand and compress the inf files I just don't know how to automate it through the addon so the Integrator does it, or am I missing something in the link?

TechnoHunter
Posts: 506
Joined: Sun Feb 26, 2006 4:13 am

Post by TechnoHunter » Thu Jan 18, 2007 5:22 pm

-blink- why expand and re-compress.. make your changes then compress.. have your addon replace the one from the disk.. problem solved :)

benners
Posts: 36
Joined: Mon Oct 10, 2005 5:29 pm

Post by benners » Thu Jan 18, 2007 5:27 pm

I thought about that, but if someone ever did an addon that altered the same file my addon would screw it up.

looks like I might be able to use

Code: Select all

[ExtraFileEdits] 
shl_img.inf|SHGINA.CopyFiles,SHGINA.CopyFiles.Guest,||1
to remove the actions, looks like the integrator expands the file if its compressed, will post back the result

User avatar
MrNxDmX
Moderator
Posts: 3112
Joined: Mon Jan 03, 2005 7:33 am

Post by MrNxDmX » Thu Jan 18, 2007 5:36 pm

Aww, sorry for that. I have mis-understood your reply (not an englshman).
And, yes that coding is true. And, it should work.

PS: Do you know what you did?
You made a removal addon with that code, just by yourself :P

benners
Posts: 36
Joined: Mon Oct 10, 2005 5:29 pm

Post by benners » Thu Jan 18, 2007 5:41 pm

MrNxDmX wrote: PS: Do you know what you did?
You made a removal addon with that code, just by yourself :P
WOW, Really, ignorance is truimphant once again, please can you elaborate.

benners
Posts: 36
Joined: Mon Oct 10, 2005 5:29 pm

Post by benners » Fri Jan 19, 2007 12:30 am

Well, nearly there, editing the shl_img.inf file stopped the default pics from being copied but the guest.bmp is still created :? . I usually copy that file via $OEM$ and it is not overwritten but I thought I would try and add it via the addon but no joy at present, I may just overwrite the one in i386 for an easier life.

@MrNxDmx
Just re-read my last post, it sounds a bit sarcastic, it wasn't meant to be, I genuinely do not know how the code makes it a removal addon :D

Xable
Posts: 981
Joined: Tue May 03, 2005 6:38 pm
Contact:

Post by Xable » Fri Jan 19, 2007 9:41 am

I think addons that remove stuff from the CD have been nick named removal addons, so your on your way with that one.
Anyway I had a play and this is what i came up with, it will remove the pictures from your cd and edit shl_ing.inf.

Code: Select all

; Addon to remove the user account pictures.
; Works with nLite and the integrator
; -------------------------------------------------------
; This section deletes the pictures from your CD.
[obsolete_files]
ASTRO.BMP
BEACH.BMP
BUTTERFL.BMP
CAR.BMP
CAT.BMP
CHESS.BMP
DIRTBIKE.BMP
DOG.BMP
DRIP.BMP
DUCK.BMP
FISH.BMP
FROG.BMP
GUEST.BMP
GUITAR.BMP
HORSES.BMP
KICK.BMP
LIFTOFF.BMP
PALMTREE.BMP
PNKFLOWR.BMP
REDFLOWR.BMP
SKATER.BMP
SNWFLAKE.BMP
SOCCER.BMP
SWTCHBRD.BMP
YAHOO.BMP
; This section removes lines from shl_img.inf to stop setup trying to install the pictures
[ExtraFileEdits] 
shl_img.inf|SHGINA.CopyFiles=16419,Microsoft\User Account Pictures\Default Pictures||1
shl_img.inf|SHGINA.CopyFiles.Guest=16419,Microsoft\User Account Pictures||1
shl_img.inf|SHGINA.CopyFiles,SHGINA.CopyFiles.Guest,||1
shl_img.inf|[SHGINA.CopyFiles]||1
shl_img.inf|"%AIRPLANE_BMP_NAME%",airplane.bmp||1
shl_img.inf|"%ASTRONAUT_BMP_NAME%",astro.bmp||1
shl_img.inf|"%BALL_BMP_NAME%",soccer.bmp||1
shl_img.inf|"%BUTTERFLY_BMP_NAME%",butterfl.bmp||1
shl_img.inf|"%CAT_BMP_NAME%",cat.bmp||1
shl_img.inf|"%FISH_BMP_NAME%",fish.bmp||1
shl_img.inf|"%PINKFLOWER_BMP_NAME%",pnkflowr.bmp||1
shl_img.inf|"%GUITAR_BMP_NAME%",guitar.bmp||1
shl_img.inf|"%SNOWFLAKE_BMP_NAME%",snwflake.bmp||1
shl_img.inf|"%BEACH_BMP_NAME%",beach.bmp||1
shl_img.inf|"%CAR_BMP_NAME%",car.bmp||1
shl_img.inf|"%CHESS_BMP_NAME%",chess.bmp||1
shl_img.inf|"%DIRTBIKE_BMP_NAME%",dirtbike.bmp||1
shl_img.inf|"%DOG_BMP_NAME%",dog.bmp||1
shl_img.inf|"%DRIP_BMP_NAME%",drip.bmp||1
shl_img.inf|"%DUCK_BMP_NAME%",duck.bmp||1
shl_img.inf|"%FROG_BMP_NAME%",frog.bmp||1
shl_img.inf|"%HORSES_BMP_NAME%",horses.bmp||1
shl_img.inf|"%KICK_BMP_NAME%",kick.bmp||1
shl_img.inf|"%LIFTOFF_BMP_NAME%",liftoff.bmp||1
shl_img.inf|"%PALMTREE_BMP_NAME%",palmtree.bmp||1
shl_img.inf|"%REDFLOWER_BMP_NAME%",redflowr.bmp||1
shl_img.inf|"%SKATER_BMP_NAME%",skater.bmp||1
shl_img.inf|[SHGINA.CopyFiles.Guest]||1
shl_img.inf|"%GUEST_BMP_NAME%",guest.bmp||1
shl_img.inf|[SHGINA.CopyFiles.Guest.Security]||1
shl_img.inf|"D:(A;;GW;;;AU)(A;OIIONP;GA;;;CO)"||1
shl_img.inf|AIRPLANE_BMP_NAME               = "airplane.bmp"||1
shl_img.inf|ASTRONAUT_BMP_NAME              = "astronaut.bmp"||1
shl_img.inf|BALL_BMP_NAME                   = "ball.bmp"||1
shl_img.inf|BUTTERFLY_BMP_NAME              = "butterfly.bmp"||1
shl_img.inf|CAT_BMP_NAME                    = "cat.bmp"||1
shl_img.inf|FISH_BMP_NAME                   = "fish.bmp"||1
shl_img.inf|PINKFLOWER_BMP_NAME             = "pink flower.bmp"||1
shl_img.inf|GUITAR_BMP_NAME                 = "guitar.bmp"||1
shl_img.inf|SNOWFLAKE_BMP_NAME              = "snowflake.bmp"||1
shl_img.inf|BEACH_BMP_NAME                  = "beach.bmp"||1
shl_img.inf|CAR_BMP_NAME                    = "car.bmp"||1
shl_img.inf|CHESS_BMP_NAME                  = "chess.bmp"||1
shl_img.inf|DIRTBIKE_BMP_NAME               = "dirt bike.bmp"||1
shl_img.inf|DOG_BMP_NAME                    = "dog.bmp"||1
shl_img.inf|DRIP_BMP_NAME                   = "drip.bmp"||1
shl_img.inf|DUCK_BMP_NAME                   = "duck.bmp"||1
shl_img.inf|FROG_BMP_NAME                   = "frog.bmp"||1
shl_img.inf|HORSES_BMP_NAME                 = "horses.bmp"||1
shl_img.inf|KICK_BMP_NAME                   = "kick.bmp"||1
shl_img.inf|LIFTOFF_BMP_NAME                = "lift-off.bmp"||1
shl_img.inf|PALMTREE_BMP_NAME               = "palm tree.bmp"||1
shl_img.inf|REDFLOWER_BMP_NAME              = "red flower.bmp"||1
shl_img.inf|SKATER_BMP_NAME                 = "skater.bmp"||1
shl_img.inf|GUEST_BMP_NAME                  = "guest.bmp"||1
; ------------------------------------------------------- 
; End, nothing more to see here :-)

User avatar
MrNxDmX
Moderator
Posts: 3112
Joined: Mon Jan 03, 2005 7:33 am

Post by MrNxDmX » Fri Jan 19, 2007 6:46 pm

Good work benners. Removal addons are used to remove things from windows setup, and make them not install. And that code will make integrator edit shl_ing.inf file, and delete both "SHGINA.CopyFiles" and "SHGINA.CopyFiles.Guest" entries. So, they wont be installed. And, thats a removal addon. Of course you should make an entries_*.ini file that contains those strings. Here an example:

Code: Select all

[general]
builddate=XX/XXX/2007
description=whatever you want
language=English
title=whatever you want
version=1.0
website=http://www.ryanvm.net/forum/
Windows=XP

[ExtraFileEdits]
shl_img.inf|SHGINA.CopyFiles,SHGINA.CopyFiles.Guest,||1
After you create that entries_addonname.ini you can use Integrator 1.4.3 withOUT compressing it. And voila its working :P

And what Xable wrote is some kind of developed one of this addon. You can add his codes to your addon too. Thanks Xable for sharing and you, for making us aware of shl_img.inf file :)

benners
Posts: 36
Joined: Mon Oct 10, 2005 5:29 pm

Post by benners » Sat Jan 20, 2007 3:21 pm

Thanks Xable and MrNxDmx for the explanations and code, I have got the addon to work as I want and it's tested ok, I have also decided to remove the entries for the My Music\Sample Music, My Pictures\Sample Pictures and Online Services portions of the inf (untested).

Regarding Xable's code, is it good addon etiquette to fully remove the files and entries from the CD?, as the same can be accomplished by just removing the entries that actually do the installing making a cleaner looking entries* file, if I make future addons I just want to do a proper job and make my addon perform in the accepted method :D if this is the case I would also edit the dosnet and txtsetup.sif files to remove the corresponding file entries and stop the file copy errors that would follow during the text mode setup.

Xable
Posts: 981
Joined: Tue May 03, 2005 6:38 pm
Contact:

Post by Xable » Sat Jan 20, 2007 5:14 pm

obsolete_files removes the dosnet/txtsetup entries aswell as the file :)

benners
Posts: 36
Joined: Mon Oct 10, 2005 5:29 pm

Post by benners » Sat Jan 20, 2007 5:22 pm

Xable wrote:obsolete_files removes the dosnet/txtsetup entries aswell as the file :)
Sweet, you gotta luv that Integrator :heart:

Post Reply