MSFN Forum: Lost Boot Defrag - MSFN Forum

Jump to content



If you are having issues with Windows after removing components and have come to ask for help, please attach (not paste) your Last Session.ini file to your post to facilitate quicker assistance.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Lost Boot Defrag Rate Topic: -----

#1 User is offline   xmf 

  • Junior
  • Pip
  • Group: Members
  • Posts: 95
  • Joined: 05-February 10

Posted 19 March 2010 - 09:19 PM

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


#2 User is offline   fdv 

  • MSFN Expert
  • Group: Developers
  • Posts: 1,089
  • Joined: 16-July 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 20 March 2010 - 07:52 PM

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]


 


#3 User is offline   Sp0iLedBrAt 

  • MSFN Addict
  • Group: Supreme Sponsor
  • Posts: 1,543
  • Joined: 19-March 09
  • OS:XP Pro x86
  • Country: Country Flag

Posted 20 March 2010 - 07:58 PM

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.

#4 User is offline   fdv 

  • MSFN Expert
  • Group: Developers
  • Posts: 1,089
  • Joined: 16-July 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 23 March 2010 - 12:44 PM

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.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy