Defragment the registry?

  • Thread starter Thread starter Antoine
  • Start date Start date
Is defragmenting the registry something that needs to be done? I have
been told this by a computer tech friend. Any input would be
appreciated. Also, is there a freeware program that can do this?

Thank you!

This needs to be done monthly or after program install/uninstall.

Start-->Run-->"SCANREG /OPT"-->OK

Made by Windows for Windows. Be prepared for a reboot.

regards

Dud (!)
 
Actually, you need to do plain "scanreg" first, then after it quits,
you can do scanreg /opt

Or instead of plain scanreg, you can do scanreg /fix, which takes care
of any problems it finds.

Nothing wrong with scanreg /fix /opt

Dud
 
Dan Rather said:
Thank you for everyones help. I used the scanreg and then scanreg /opt
commands. It seemed to have worked. I really don't see much of an
improvement though.

Try the batch file below in your Windows directory under plain
DOS (not a DOS session under Windows). Be warned that it can
take a few minutes if your registry is very large, with no
indication on screen that anything is happening; the hard disk
light should flicker to show that it's working. The procedure
will leave behind a large file called compact.reg which has a
plain text version of the registry. I find this useful, but you
can uncomment the last line of the batch file if you want it
deleted automatically.

@echo off
c:\windows\command\attrib -s -h -r c:\windows\system.dat
c:\windows\command\attrib -s -h -r c:\windows\user.dat
copy c:\windows\system.dat c:\
copy c:\windows\user.dat c:\
rem above two lines backup the registry in case of trouble
echo.
echo Exporting system.dat
c:\windows\regedit /l:c:\windows\system.dat /e compact.reg
echo Rebuilding system.dat
c:\windows\regedit /l:c:\windows\system.dat /c compact.reg
echo.
echo Exporting user.dat
c:\windows\regedit /r:c:\windows\user.dat /e compact.reg
echo Rebuilding user.dat
c:\windows\regedit /r:c:\windows\user.dat /c compact.reg
echo.
rem del compact.reg
 
(e-mail address removed) (ozzy) wrote in


Don't. it's just like fdisk /mbr.
Doesn't show with the /? parameter.

Well I have access to several pcs with win98 & 98se & NONE of the 12
pcs recognizes the /opt switch. Emailed several friends & asked them
to check too; none of theirs have it either. Microsoft support claims
it is NOT a valid switch. As it is only 165 KB, & if you wouldn't mind
emailing me a copy of your scanreg.exe file, I would like to see what
the differences are.
 
The /opt option is documented here:

http://support.microsoft.com/default.aspx?scid=kb;en-us;303089

and in several other MS knowledge base articles.

If the above isn't enough admission from MS that the /opt option exists,
then what is...
I fully agree :) but during my contact via support.microsoft.com
several months ago I mentioned that I was having problems with a
clients pc & /restore was giving me problems. They kindly referred me
to http://support.microsoft.com/default.aspx?scid=kb;en-us;184023
which shows the /fix/opt switch. It was since then that I noticed it
never worked on ANY 98 or 98SE pc. It did work on 98ME though.( BTW,
Microsoft never did solve my original /restore issue with the clients
pc ;o)

Back to support I went & they said that the switch is for 98ME only &
will not work in 98 or 98SE but is built in (see below). I gave up
with Microsoft because there are; as you & others already noticed;
tons of references in the KB articles with refs to the /opt switches.
I am not doubting that some of you have /opt working. I just know that
none of our pcs recognize it.

The scanreg.ini file has a line inside that automatically does it by
default (see below)

;Registry automatic optimization is skipped if this is set to 0
Optimize=1

Now back to the OP question....... who has a good link to a registry
defragger :)
 
(e-mail address removed) (ozzy) wrote in
Well I have access to several pcs with win98 & 98se & NONE
of the 12 pcs recognizes the /opt switch. Emailed several
friends & asked them to check too; none of theirs have it
either. Microsoft support claims it is NOT a valid switch.
As it is only 165 KB, & if you wouldn't mind emailing me a
copy of your scanreg.exe file, I would like to see what the
differences are.

As someone else in this thread already pointed out (I believe)
you run scanreg /opt after scanreg /fix, or as someone else
pointed out a single command line to rub them both
consecuatively. Something like scanreg /fix/opt.
 
As someone else in this thread already pointed out (I believe)
you run scanreg /opt after scanreg /fix, or as someone else
pointed out a single command line to rub them both
consecuatively. Something like scanreg /fix/opt.

It works for me on 98SE, but I must admit it scared me by coming up in safe
mode.

However scanreg/restore wasn't needed as the next try at booting was fine.

The difference in performance is underwhelming!

mike r
 
This needs to be done monthly or after program install/uninstall.

Start-->Run-->"SCANREG /OPT"-->OK

You should not use this switch without first compacting the registry
via scanreg or scanreg /fix.
 
Scanreg /fix and Scanreg /opt were available in Win9x but they had to be run
from DOS mode. I've never used ME but from what I've seen here and other on
NG's you could not boot into DOS.
 
Is defragmenting the registry something that needs to be done? I have
been told this by a computer tech friend. Any input would be
appreciated. Also, is there a freeware program that can do this?

Thank you!

After wading through all the responses to your question, I will
assume you are inquiring about 'compacting' the registry. This
subject was examined, cussed and discussed in depth recently in
the more appropriate NG, microsoft.public.win98.gen_discussion.

Following is one of the more thorough positions on this subject:
____________________________

Subject: Re: Scanreg /opt and /fix registry compaction - results
Date: Wed, 28 May 2003 00:47:55 -0700
Newsgroups: microsoft.public.win98.gen_discussion

I know I'm not following the party line, here, but I once did
substantial tests of these operations.

First, the scanreg backups are not really a good indication of
Registry size. It's a compressed archive, subject to variations
in the compression ratio. And the backup/restore functions are
the only ones which involve files other than the Registry DAT
files.

If you read the literature, you'll discover that all the /opt
switch does is remove empty records--it's a simple database
compaction (and perhaps "repair") function, pretty much identical
to any other database compaction facility found all over the place,
even in OE (Compact Folders.) When you delete records in many
databases, the actual space that the record occupied remains in the
structure--it's just empty of useful data. Compacting removes
these empty records and sometimes repairs the table structures and
relational connections, plus re-indexing if indexing is a part of
the database's behavior.

The /fix switch actually inspects for certain types of invalid or
meaningless entries, then rebuilds it from scratch--functionally
similar, or perhaps even exactly the same as, the old Export/Import
routines that used to be done to repair and optimize the Registry,
analogous to defragmenting with file optimization. /Fix also appears
to "align" the DAT files on 4KB sectors, preventing any particular
entry from spanning two pages of RAM. Further indications exist to
suggest that empty space is left where expansion is expected, though
that may be stretching it a bit.

In fact, if you run /opt and then /fix, and then /opt again, then
look at the size, then run /fix again, the Registry grows slightly,
and by quantities that are suspiciously round in binary terms. If
you run /opt again, that extra added file size gets removed. You can
go back and forth like this ad infinitum. But the only time you "may"
get any different figures for /fix or /opt compared to themselves is
comparing an /opt run before /fix to another /opt run after /fix.
Once /fix has been run, that Registry is optimized, and running /opt
will only remove small quantities of empty space that /fix put in
there for the sake of better performance and reliability.

So, for my money, the proper procedure is to boot to a "pure DOS"
situation, load SMARTDRV (or it will take a long, long, long time...)
Then run scanreg /opt to get rid of empty records, then run /fix to
re-write the files in proper order and align the data.

Gary S. Terhune
MS MVP for Windows 9x
__________________

Interesting!

BoB
For the duration, my address is fake.
 
[snip]
I don't know about Win ME but Win98 only has RESTORE, BACKUP or FIX as
options. /OPT has NEVER been an option in 98 according to Microsoft;
but then who believes Microsoft :)


==> Don't know where you got that information about 98 but it is
wrong. Scanreg fix/opt
works in all iterations of 98. I used dozens of time when I was
running 98. Furthermore, M$ recommends that that DOD command be run 3
consecutive times to be sue that *all* of the registry is cleaned and
defragged.

--
Phil

\\\///
( o o )
--------oOOO-- ( )--OOOo------
(e-mail address removed)
 
Back
Top