Jump to content

Lost Boot Defrag


Recommended Posts

Posted

I opted to eliminate MS's defrag using nLite - so it makes sense that now boot defrags are impossible.

Is there an easy way to restore this function?

Thanks


Posted

This is/was the INF I wrote for Win2k. Save as an INF, etc etc etc etc etc.

You will have to add the boot time defrag reg key value. I don't recall what that is offhand but it's an easy enough search on the net.

I cannot guarantee that all of the files will be the same for XP but I think it's probably a pretty sure bet.


[Version]
signature="$Windows NT$"
ClassGUID={00000000-0000-0000-0000-000000000000}
SetupClass=Base
LayoutFile=layout.inf

[DestinationDirs]
files.add.sys = 11

[DefaultInstall]
UnregisterDlls = unregister
RegisterDlls = register
RenFiles = files.rename
CopyFiles = files.add.sys,files.add.win
DelFiles = files.del.sys,files.del.inf,files.del.help,files.del.win
AddReg = keys.add
DelReg = keys.del
ProfileItems = DefragInstallItems
;Reboot ; this will prompt you, not do it automatically

[DefaultInstall.NT]
UnregisterDlls = unregister
RegisterDlls = register
RenFiles = files.rename
CopyFiles = files.add.sys,files.add.win
DelFiles = files.del.sys,files.del.inf,files.del.help,files.del.win
AddReg = keys.add
DelReg = keys.del
ProfileItems = DefragInstallItems
;Reboot ; this will prompt you, not do it automatically

[SourceDisksFiles]
dfrg.inf = 1 ; this file
dfrg.msc = 1
dfrgfat.exe = 1
dfrgntfs.exe = 1
dfrgres.dll = 1
dfrgsnap.dll = 1
dfrgui.dll = 1

[files.add.sys]
dfrg.msc
dfrgfat.exe
dfrgntfs.exe
dfrgres.dll
dfrgsnap.dll
dfrgui.dll

[unregister]

[register]
11,,dfrgsnap.dll,1
11,,dfrgui.dll,1

[files.rename]

[files.add.sys]

[files.add.win]

[files.del.sys]

[files.del.inf]

[files.del.help]

[files.del.win]

[files.del.prog]

[files.del.desktop]

[keys.add]
HKCR,"Drive\shell\Defrag",,0x00000012
HKCR,"Drive\shell\Defrag\command",,,"mmc.exe /s ""%11%\dfrg.msc"""
HKLM,"SOFTWARE\Microsoft\Dfrg","FreeSpaceErrorLevel",0x00000000,"15"
HKLM,"SOFTWARE\Microsoft\Dfrg","PathName",0x00020000,"%systemroot%\system32"
HKLM,"SOFTWARE\Microsoft\Dfrg","ResourceDllName",0x00020000,"%systemroot%\system32\DfrgRes.dll"
HKCR,"CLSID\{80EE4901-33A8-11d1-A213-0080C88593A5}","",0x00000000,"Defrag NTFS engine"
HKCR,"CLSID\{80EE4901-33A8-11d1-A213-0080C88593A5}\LocalServer32","",0x00000000,"DfrgNtfs.exe"
HKCR,"CLSID\{80EE4902-33A8-11d1-A213-0080C88593A5}","",0x00000000,"Defrag FAT engine"
HKCR,"CLSID\{80EE4902-33A8-11d1-A213-0080C88593A5}\LocalServer32","",0x00000000,"DfrgFat.exe"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\DefragPath",,0x00000010
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\DefragPath","",0x00020000,"%systemroot%\system32\dfrg.msc %c:"

[keys.del]

[DefragInstallItems]
Name = "Disk Defragmenter"
CmdLine = 11,, dfrg.msc
SubDir = "Accessories\System Tools"
WorkingDir = 11
InfoTip = "Defragments your volumes so that your computer runs faster and more efficiently."
IconPath = 11,,DfrgRes.dll
IconIndex = 0

[Strings]


Posted

wow! this is useful even for me not having a problem! fdv, where were you when I had problems with defrag support? :whistle:

xmf, please report back on the success of your action.

Posted

Honestly I think if people studied my files for 2k and xp they'd find a goldmine.

Tiny example: nLite leaves files in SYSTEM.

Solution: open SYSSETUP.INF, scroll to [Files.Install.CleanInstall] and put ONLY this line:

CopyFiles=Files.System

If you like, delete all of those files under [Files.NoWin31.System32ToSystem]

Another example: the HIVE*.INF files are filled with petabytes of useless, outdated information (okay not that much, but you get the idea). You can cut out obsolete data by editing the heck out of them. nLite does this to some degree, but there's always more to add. Also, a lot of tweaks that nLite adds can be added here, and timezones are in HIVESFT, so why not fix them permanently?

Another, while I'm at it: you can set windows permissions in DEFLTWK.INF so that all of those un-deletable directories can be deleted. You can also disable prefetch by denying system permissions to it.

etc etc.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...