Why aren't more programs portable

  • Thread starter Thread starter J44xm
  • Start date Start date
J

J44xm

Why aren't more programs portable? I just bought a huge portable hard drive
and I'm transferring many of my applications there and finding that they
write their settings (or sometimes some other information) to the Registry
and not to the application folder. Is there a reason more software authors
choose to use the Registry instead of an .ini or .dat file or something?
This is pretty frustrating.
 
I'm surprised you expected that just copying the application files and
running them from the portable hard drive would work. That would have
worked fine with DOS 6.22, not so well with Windows. Even Windows 3.1
had a registry, but it wasn't as important back then.

Saving settings in INI files started being frowned upon by Microsoft
starting with Windows 95. As you have discovered, 99% of Windows
programs today will need the registry, that is why you have to run a
setup program instead of just copying the files as was done in the DOS
days.
 
Why aren't more programs portable? I just bought a huge portable hard drive
and I'm transferring many of my applications there and finding that they
write their settings (or sometimes some other information) to the Registry
and not to the application folder. Is there a reason more software authors
choose to use the Registry instead of an .ini or .dat file or something?
This is pretty frustrating.
What Is a Windows System Registry?
The system registry is one of the most important parts of a
Windows-based computer system. The registry is a system-defined database
used by the Windows operating system to store configuration information.
Most Windows applications write data to the registry during
installation, and system components store and retrieve configuration
data through the registry. The data stored in the registry varies
according to the version of Microsoft Windows.

How Applications Use the Registry
Applications use the registry in several ways. They can add data to your
registry by creating or opening existing keys. When applications add to
the registry, the data is sorted by computer-specific data or
user-specific data. Through this distinction applications can support
multiple users and locate user profile data. An application can close a
key and write the data it contains into the registry and applications
can delete a value from a key or delete a key. Applications can also
save specific data, or parts of the system registry in a file to load
that file into the registry which is common when large amounts of data
is being handled, or when multiple entries are being added to the
registry.

In Windows 3.1, INI or initialization files were used to hold
information used to configure application programs. For example, an INI
file might have a list of the most recently used files or hold the
status of an option to save modified files. However, INI files had
several weaknesses:

* Uncertain location-INI files could be found in either the \windows
directory or the application's directory.
* Size limitations-INI files were limited to 64K bytes.
* Easy to modify-INI files were simple text files. End-users could
modify them and create technical support problems.
* Hard to back up-Since INI files can be in any directory, it was nearly
impossible to back up and restore application configurations.

These problems, and others, prompted Microsoft to design the Registry.
The Registry is a database that contains information about your
operating system, its applications and file associations. An exhaustive
list of the different types of information is too long to reproduce
here. Suffice to say that the Registry holds both hardware and software
information.

Opting for no install programs that don't write to the Registry is the
same as opting to continue to run DOS when the rest of the world has
moved on to newer Operating Systems.
 
Mel said:
Opting for no install programs that don't write to the Registry is the
same as opting to continue to run DOS when the rest of the world has
moved on to newer Operating Systems.
_________________________________________________

Really? Forte's Agent, one of the best email and newsreader
combinations around, doesn't need the Registry at all. It is completely
portable and works on all flavors of Windows. When you need to, just
copy the entire Agent folder to another computer or drive and it works.

I gave it up because it doesn't support html based email. If they ever
add html support I'll go back to it.

The point is, it can be done, as all Linux users know.

Bill T.
 
Bill Turner wrote at 17-8-2005 7:31:22:
Forte's Agent, one of the best email and newsreader
combinations around, doesn't need the Registry at all. It is completely
portable and works on all flavors of Windows. When you need to, just
copy the entire Agent folder to another computer or drive and it works.

I gave it up because it doesn't support html based email. If they ever
add html support I'll go back to it.
Maybe if they support HTML e-mail they need Microsofts DLL's and his
Registry?
 
Hi,

The Windows registry is not all good, and problems with it are well
known. It is one central point of weakness, and difficult to maintain
and migrate.

With .NET, Microsoft is backtracking and is now recommending that
application settings be written as XML files to the user profile folder
instead of the registry.

Regards.
 
_________________________________________________

Really? Forte's Agent, one of the best email and newsreader
combinations around, doesn't need the Registry at all. It is completely
portable and works on all flavors of Windows. When you need to, just
copy the entire Agent folder to another computer or drive and it works.

Exactly, and it works nice...
I gave it up because it doesn't support html based email. If they ever

Thanks god...
 
On 17 Aug 2005, dave_test wrote
I'm surprised you expected that just copying the application files
and running them from the portable hard drive would work. That
would have worked fine with DOS 6.22, not so well with Windows.
Even Windows 3.1 had a registry, but it wasn't as important back
then.

Saving settings in INI files started being frowned upon by
Microsoft starting with Windows 95. As you have discovered, 99% of
Windows programs today will need the registry, that is why you
have to run a setup program instead of just copying the files as
was done in the DOS days.


Is that "99% will need", or just "99% will use"?

I'm fairly certain I've come across simple executable programs which
use an installer as a sort of fig-leaf to create the application folder
-- because some users find it impossible to believe that a program
that's not installed to the registry could possibly work.
 
Thanks, Mel.

That's a very decent description of the registry. Well-crafted. Good
writing.

Richard
 
dave_test said:
Saving settings in INI files started being frowned upon by Microsoft
starting with Windows 95. As you have discovered, 99% of Windows
programs today will need the registry, that is why you have to run a
setup program instead of just copying the files as was done in the DOS
days.

*sigh* ........ah yes, the good old days!! :)

Cheers,
Buzzy :)

--
--- Buzzy's Stall Wall ---
www.buzzys.net
"The World Wide Web's Rest Area"
Warning: This site contains MY
version of freeware! All are welcome!
 
Harvey Van Sickle said on Aug 17, 4:49 am
I'm fairly certain I've come across simple executable programs which
use an installer as a sort of fig-leaf to create the application folder

I've seen those too, but not too many of them. I was a big user of
Forte Free Agent, back when ISP's thought it was important to offer a
Usenet feed.
- because some users find it impossible to believe that a program
that's not installed to the registry could possibly work.
If I'm the tech supporting them on a regular basis, I'd much rather
deal with those users than those users who burn their C:\Program
Files\Microsoft Office\ to a CD, copy it to a new computer without an
install and then are surprised when it doesn't work.

If the registry is bad, simply recognize that the majority of
developers are going to look to Microsoft for guidance, although I
agree with the comment about .NET being a throwback to the days of .INI
files. If you can wait for the dotnet runtime to be a standard part of
the OS instead of a giant download, .NET programs are supposed to run
independent of the registry and you should be able to just copy the
files.

As as aside, I didn't know that Forte Agent didn't use the registry
(hopefully this doesn't just mean it's the Windows 3.1 version running
OK on later versions). I used to use that program a lot back in the day
when ISP's (wisely) thought it was important to provide a Usenet feed.
Nowadays I have to use Google Groups.
 
On 17 Aug 2005, dave_test wrote

-snip-
As as aside, I didn't know that Forte Agent didn't use the
registry (hopefully this doesn't just mean it's the Windows 3.1
version running OK on later versions).

OTOH, XNews is a non-install program which uses the registry to store
certain bits of information; go figure. (I saw an explanation by Luu
Tran about this years ago, but have forgotten why he did it that way.)
I used to use that program a lot back in the day when ISP's
(wisely) thought it was important to provide a Usenet feed.
Nowadays I have to use Google Groups.

Posting from Google Groups: living proof that the Internet doesn't
always get better....

(It's clearly a superb archive, but for posting it's pants compared
with a dedicated newsreader.)
 
It kind of makes sense for a newsreader not to use the registry because
don't they traditionally use a file called .newsrc which lists all the
available groups? Probably no need to dump all that junk in the
registry, which could make the programmer think, why use the registry
at all?
 
-snip-
Opting for no install programs that don't write to the
Registry is the same as opting to continue to run DOS when
the rest of the world has moved on to newer Operating
Systems.
Er, this is an opinion of ...?

J
 
When applications add to the registry, the data is sorted by
computer-specific data or user-specific data. Through this distinction
applications can support multiple users and locate user profile data.

This is definitely a good thing. Of course, can't the same thing be done
by using the user-specific Application Data directories or, far better, by
reading the system's current username and just saving the config file in
the application directory using the name of the current user? BSPlayer
uses user-specific XML files in its application directory. This seems like
an excellent solution.
However, INI files had several weaknesses:

* Uncertain location-INI files could be found in either the \windows
directory or the application's directory.

Sounds like bad programming, which is what the Registry was supposed to
help with, I suppose. Why would you tell your application to save its
settings to the Windows directory and not your application's folder?
* Size limitations-INI files were limited to 64K bytes.

Ah. Still, as Andrew mentioned, XML files could be used. (foobar2000 seems
to have a binary .cfg file.)
* Hard to back up-Since INI files can be in any directory, it was nearly
impossible to back up and restore application configurations.

Unless, of course, they're kept in the application directory.
Opting for no install programs that don't write to the Registry is the
same as opting to continue to run DOS when the rest of the world has
moved on to newer Operating Systems.

Certainly not.
 
["dave_test"; Wed, 17 Aug 2005 04:27:32 GMT]
I'm surprised you expected that just copying the application files and
running them from the portable hard drive would work.

I tried only with certain programs that seemed to be isolated and found
success with some. Some that I didn't think used the Registry do very much.
But my complaint is more general, because I'm looking for suitable portable
replacements for some applications and not finding them for some types of
program. (Yeah, I didn't try with Office.) ;-)
 
I'm working on portable-fying some of my applications. My primary focus is
Pegasus Mail.

I have a two-pronged plan: I keep programs' Registry settings in .reg files
on my portable hard drive and then merge specific .reg files with the
current computer's Registry immediately before I boot specific programs;
then, when I close the program, I export that program's Registry settings
back to a .reg file on my drive and then delete the Registry settings. This
seems feasible to me, though I welcome advice. (Would this approach only
work when I have administrative rights?)

I've been backing up the Registry settings from a batch file (excerpt):
reg export "HKCU\Software\Pegasus Mail" pmail.reg
reg delete "HKCU\Software\Pegasus Mail" /f

So I'm wondering how I could automate the process. I could start
applications through a batch file that would merge the appropriate Registry
settings and then start the program, but that approach would require that I
manually (through a batch file, of course) export and remove the necessary
Registry keys after I'm done. Does anyone know of any small software that
might help with something like this?

This might be beyond the scope of this group, but since this sort of thing
concerns the freeware community, I hope someone might have some sort of
ideas.
 
I'm working on portable-fying some of my applications. My primary focus is
Pegasus Mail.

I have a two-pronged plan: I keep programs' Registry settings in .reg files
on my portable hard drive and then merge specific .reg files with the
current computer's Registry immediately before I boot specific programs;
then, when I close the program, I export that program's Registry settings
back to a .reg file on my drive and then delete the Registry settings. This
seems feasible to me, though I welcome advice. (Would this approach only
work when I have administrative rights?)

I've been backing up the Registry settings from a batch file (excerpt):

So I'm wondering how I could automate the process. I could start
applications through a batch file that would merge the appropriate Registry
settings and then start the program, but that approach would require that I
manually (through a batch file, of course) export and remove the necessary
Registry keys after I'm done. Does anyone know of any small software that
might help with something like this?

This might be beyond the scope of this group, but since this sort of thing
concerns the freeware community, I hope someone might have some sort of
ideas.
How to Remove Windows 95/98 Registry Entries Automatically

http://support.microsoft.com/?kbid=171424&sd=RMVP

How to perform advanced clean-boot troubleshooting in Windows XP

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

Take a look at ScanReg

http://www.cadinfo.net/editorial/winsysutilsl.htm

Using Reg Files and Script Files

http://www.mvps.org/serenitymacros/help.html

http://www.mvps.org/serenitymacros/index.html
 
Bill Turner:
_________________________________________________

Really? Forte's Agent, one of the best email and newsreader
combinations around, doesn't need the Registry at all. It is completely
portable and works on all flavors of Windows. When you need to, just
copy the entire Agent folder to another computer or drive and it works.

There are several "no-install" Applications, especially in the
freeware/shareware sector. That's why evrey so often, people ask for
it here.

My personal favorites:

Agent
Pegasus Mail
putty
Magic Mail Monitor
The Sysinternal Tools (FileMon, RegMon, TCPView, TDIMon, ...)
....
IIRC even Mozilla FireFox works without installation, and can be run
from an external drive or USB Stick


Viele Grüße,
Sascha
 
Back
Top