Board index » delphi » Re: Running Delphi from a portable drive?

Re: Running Delphi from a portable drive?


2003-12-10 12:46:50 AM
delphi78
Cross-posted and off-topic in these newsgroups.
b.p.d.deployment is for questions regarding deployment of Delphi apps.
b.p.d.l.objectpascal is for questions about the Delphi language.
For the best answer to this question I would recommend posting it to
borland.public.delphi.ide.
Please note that Borland's rules for the use of their news server
forbid cross-posting. You can read the rules here:
info.borland.com/newsgroups/guide.html
In the future, please choose a single, appropriate newsgroup for your
question.
Thank you,
-Craig
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : delphi.weblogs.com
IB 6 versions prior to 6.0.1.6 are pre-release and may corrupt
your DBs! Open Edition users, get 6.0.1.6 from mers.com
 
 

Re: Running Delphi from a portable drive?

There was a posting in 2001 in borland.public.delphi.objectpascal with
Subject: Delphi Setup Question which relates to my question; I have
crossposted to b.p.d.deployment & b.p.d.language.objectpascal. I haven't
found any information on Usenet or the Web, though I suppose it must be
there.
I would like a totally portable Delphi environment on portable storage
(e.g., a 1GB or 2GB USB memory stick or USB hard drive). The Delphi
program files and projects would all live on the plugin memory, and it
would be possible to work on any computer to hand running 32-bit Windows
and with a USB port.
The only problems I can envisage are with the registry and .INI files.
While I would like to hear from someone who's done it, my first guess at how
to do it would involve setting up a .REG file with all the registry
settings, and .INI files. The appropriate registry settings could be
read from an existing setup. As I can not entirely control the drive
letter (if the system lets me select a letter, my preferred letter may
already be in use), I'd try one of the following approaches for
registry entries:
1. Set up a share with a fixed name for the portable drive on each host
machine, e.g., ab_delphi. Then, in the .REG file, use
\\%computername%\ab_delphi\borland\delphi6\bin...
instead of
C:\borland\delphi6\bin...
2. Set one or more environment variables on the host machine like
set borlandpath=I:\BORLAND
Then in the .REG file use
%borlandpath%\delphi6\bin...
3. If all else fails, create a number of .REG files, all identical
except for having
d:\borland\delphi6\bin...
e:\borland\delphi6\bin...
f:\...
etc. (trivially easy with search and replace).
Obviously, so something similar for the .INI files.
To complete the job, we would want to check whether Delphi was already
installed (in which case we don't want to change the registry, but to
use the existing installed program); and we would want to delete all the
added entries to the registry after finishing (maybe not; they should
not do any harm, and will be there for the next time?)
If this has been done, I would dearly like to find out the details. If not,
does anybody have any comments or suggestions? I don't think this should
cause any problems with licencing.
In particular, I am not 100% certain that registry settings are always
the same (except for file locations) from machine to machine -- would
some be dependent upon the particular setup of the machine being used?
Best wishes,
--
Michael Salem