BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

re-installing Delphi Application

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc
View previous topic :: View next topic  
Author Message
John Dammeyer
Guest





PostPosted: Fri Jan 30, 2004 9:19 am    Post subject: re-installing Delphi Application Reply with quote



Hi all,

I know this isn't a 'strict' Delphi question but perhaps someone here
has the answer or at least can point me to a usenet group that does.

I've developed this Delphi app that will run on an embedded PC104
system with a touch screen and A/D board. Connection to the outside
world is via a USB JumpDrive or USB printer. Internally the unit has
a Compact Flash 512MB card for the hard drive.

Once a unit returns from the field, the managers would like to
'clean' the system. That means they'd like to run some sort of batch
file or script that deletes all the temporary files and reconfigures
the system the way it was before it was shipped out. They also have
50 units with virgin WIN98SE and the JumpDrive drivers that need
initial configuring. That means no network support and nothing on the
desktop that someone could run while the application is starting.

The Deplhi application needs to register a number of ActiveX controls
and install the DLLs in the proper directory. That's pretty easy
using Installshield.

But what seems to be the simplest would be to force WIN98SE into
recovering a backup of the correctly configured system registry. A
backup that is copied over from the USB JumpDrive. As long as the
batch application copied over all the correct files to the proper
directories it wouldn't matter what sort of changes had been made to
the system, a replacement registry would return the system to it's
original 'configured' settup.

Alternatively, perhaps creating a system recovery disk image that is
run from the JumpDrive?

Has anyone ever done this? Suggestions? Reference books? Different
Usenet group?

Thank you.

John Dammeyer

Back to top
J French
Guest





PostPosted: Fri Jan 30, 2004 10:24 am    Post subject: Re: re-installing Delphi Application Reply with quote



On Fri, 30 Jan 2004 09:19:03 GMT, [email]johnd (AT) STRIP (DOT) autoartisans.com[/email] (John
Dammeyer) wrote:

Quote:
Hi all,

I know this isn't a 'strict' Delphi question but perhaps someone here
has the answer or at least can point me to a usenet group that does.

I've developed this Delphi app that will run on an embedded PC104
system with a touch screen and A/D board. Connection to the outside
world is via a USB JumpDrive or USB printer. Internally the unit has
a Compact Flash 512MB card for the hard drive.

Once a unit returns from the field, the managers would like to
'clean' the system. That means they'd like to run some sort of batch
file or script that deletes all the temporary files and reconfigures
the system the way it was before it was shipped out. They also have
50 units with virgin WIN98SE and the JumpDrive drivers that need
initial configuring. That means no network support and nothing on the
desktop that someone could run while the application is starting.

The Deplhi application needs to register a number of ActiveX controls
and install the DLLs in the proper directory. That's pretty easy
using Installshield.

But what seems to be the simplest would be to force WIN98SE into
recovering a backup of the correctly configured system registry. A
backup that is copied over from the USB JumpDrive. As long as the
batch application copied over all the correct files to the proper
directories it wouldn't matter what sort of changes had been made to
the system, a replacement registry would return the system to it's
original 'configured' settup.

I am not sure about Jump Drives however I have recently run into a
similar problem on a totally different Win98 device

The Registry is stored in two files both in c:windows
They are USER.DAT and SYSTEM.DAT

When the machine is booting you can insert something in AUTOEXEC.BAT
that can copy over those files
- when 98 is fully loaded those files cannot be written to, which is
just as well as they are cached up in RAM

I think you may be able to do everything you want from a batch file
invoked by AUTOEXEC.BAT and only triggered if a 'signal file' is
present

Note that this could create problems if you send out new AX controls

Also I don't think you need to bother with InstallShield
- you can RegSvr32 stuff yourself
there is even a sneaky way to do it from within code

Quote:

Alternatively, perhaps creating a system recovery disk image that is
run from the JumpDrive?

If the JumpDrive is what I think it is, and is run through the USB,
then you need Win98 up and running to access the JumpDrive, but by
then it would be hard to run the recovery stuff

You could have a routine that copies the image to the machine, patches
AUTOEXEC.BAT and then restarts the machine
- when the machine is in DOS mode you can get up to some mischief
something like Ghost - or even use Int26h yourself
.... but to restore an image from the same drive that the image is on
is tricky ...

If you could partition your internal RAM card it would make things
easier.

Also ... IME you need some sort of ROM based bootstrap so you can
configure a totally naked machine - that is how we did something
similar on a precursor to the PC104 design

It would be interesting to know more about your hardware

Quote:

Has anyone ever done this? Suggestions? Reference books? Different
Usenet group?

Ghost, Acronis, PowerQuest DriveImage
- there are others about

Quote:

Thank you.

John Dammeyer



Back to top
Jeremy Collins
Guest





PostPosted: Fri Jan 30, 2004 11:41 am    Post subject: Re: re-installing Delphi Application Reply with quote



John Dammeyer wrote:

Quote:
Once a unit returns from the field, the managers would like to
'clean' the system. That means they'd like to run some sort of batch
file or script that deletes all the temporary files and reconfigures
the system the way it was before it was shipped out. They also have
50 units with virgin WIN98SE and the JumpDrive drivers that need
initial configuring. That means no network support and nothing on the
desktop that someone could run while the application is starting.

I wonder if you could use Ghost (or DriveImage) to make a copy of
a "clean" install, and just overwrite the whole thing when it
gets back...?


--
jc

Remove the -not from email

Back to top
AlanGLLoyd
Guest





PostPosted: Fri Jan 30, 2004 3:08 pm    Post subject: Re: re-installing Delphi Application Reply with quote

In article <401a1f66.141664122 (AT) news (DOT) islandnet.com>,
[email]johnd (AT) STRIP (DOT) autoartisans.com[/email] (John Dammeyer) writes:

Quote:
Alternatively, perhaps creating a system recovery disk image that is
run from the JumpDrive?


Or a disk image copying machine - I would think that they were not that
expensive (especially comparing prices with the time cost of engineers doing it
some other way).

Alan Lloyd
[email]alanglloyd (AT) aol (DOT) com[/email]

Back to top
John Dammeyer
Guest





PostPosted: Fri Jan 30, 2004 4:43 pm    Post subject: Re: re-installing Delphi Application Reply with quote

That you for the suggestions. However, they have tried Ghost and it
appears unreliable works less than 50% of the time. The internal
Flash Drive which holds the OS and all the applications is behind 32
socket head screws that are held tight with locktite. It's not an
option to take them apart on a regular basis.

The Ghost experience left them with three flash cards that needed to
be removed, reformatted and the OS re-installed.

The WIN98 Help file says there can be up to 5 backups of the Registry
so perhaps just replacing the autoexec.bat with a special version from
the jumpdrive dongle. This autoexec.bat could delete the registry
files. That might work. I'll give it a try.

John


[email]alanglloyd (AT) aol (DOT) com[/email] (AlanGLLoyd) wrote:

Quote:
In article <401a1f66.141664122 (AT) news (DOT) islandnet.com>,
[email]johnd (AT) STRIP (DOT) autoartisans.com[/email] (John Dammeyer) writes:

Alternatively, perhaps creating a system recovery disk image that is
run from the JumpDrive?


Or a disk image copying machine - I would think that they were not that
expensive (especially comparing prices with the time cost of engineers doing it
some other way).

Alan Lloyd
[email]alanglloyd (AT) aol (DOT) com[/email]


Back to top
John Dammeyer
Guest





PostPosted: Fri Jan 30, 2004 5:21 pm    Post subject: Re: re-installing Delphi Application Reply with quote

[email]erewhon (AT) nowhere (DOT) com[/email] (J French) wrote:
Quote:
The Registry is stored in two files both in c:windows
They are USER.DAT and SYSTEM.DAT

Thanks.
Quote:

When the machine is booting you can insert something in AUTOEXEC.BAT
that can copy over those files
- when 98 is fully loaded those files cannot be written to, which is
just as well as they are cached up in RAM

I think you may be able to do everything you want from a batch file
invoked by AUTOEXEC.BAT and only triggered if a 'signal file' is
present


Perhaps a delsys.bat file called from autoexec.bat. If it's there
then it would delete the two .dat files. In Autoexec.bat, after
calling delsys.bat it would then delete delsys.bat.

Quote:
Note that this could create problems if you send out new AX controls

Also I don't think you need to bother with InstallShield
- you can RegSvr32 stuff yourself
there is even a sneaky way to do it from within code


Do you know if the RegSvr32 modifies the registry? If it does, then
writing an app that does my specific registry entries is trivial.
Quote:

Alternatively, perhaps creating a system recovery disk image that is
run from the JumpDrive?

If the JumpDrive is what I think it is, and is run through the USB,
then you need Win98 up and running to access the JumpDrive, but by
then it would be hard to run the recovery stuff

That's what I was thinking too after I pondered a bit more. Can't run
the USB as a drive till windows is up so it can't really be a boot
drive.

Quote:

You could have a routine that copies the image to the machine, patches
AUTOEXEC.BAT and then restarts the machine
- when the machine is in DOS mode you can get up to some mischief
something like Ghost - or even use Int26h yourself
... but to restore an image from the same drive that the image is on
is tricky ...

Ghost inadvertantly trashed a couple of the internal flash cards and
so then the boxes needed to be taken apart and the cards pulled and
reformatted. That took them a while since the card wasn't recognized
so it wouldn't format.... catch-22.

Quote:

If you could partition your internal RAM card it would make things
easier.

Also ... IME you need some sort of ROM based bootstrap so you can
configure a totally naked machine - that is how we did something
similar on a precursor to the PC104 design

That's a good point. I'll have my customer contact the hardware
manufacturer.
Quote:

It would be interesting to know more about your hardware

It's a Pentium 566MHz with a 640x480 LCD display in a waterproof

aluminium box held closed with some 32 screws that are locktite glued.
There are three water resistant plugs. One for AC power. Plug it in
and the system starts up. One for the 4-20ma intrinsically safe
internal module and one with a cover that has a USB connector inside.

It's kind of a sophisticated chart recorder. One stripchart (ActiveX)
is from GlobalMajic (along with a button ActiveX control) and the
other I had to write from scratch in order to meet the customer
specifications.

The A/D is a 16 bit custom card that shoves data into an 8K FIFO at
1KHz. That gives me the freedom to pull the data out at the PC end on
their 55ms Timer ticks without worrying about the data integrity.

I'm not allowed to say much about the actual application but I
accumulate up to 2 minutes of data and then save that into a fixed
record size database. (Yes, it gets big and later on I'll rewrite it
to compress the data). The index of the database holds some key
information from the acquired data and that's what is plotted on the
GlobalMajic Stripchart.

John

Quote:

Has anyone ever done this? Suggestions? Reference books? Different
Usenet group?

Ghost, Acronis, PowerQuest DriveImage
- there are others about


Thank you.

John Dammeyer




Back to top
J French
Guest





PostPosted: Sat Jan 31, 2004 9:32 am    Post subject: Re: re-installing Delphi Application Reply with quote

Inline :-

On Fri, 30 Jan 2004 17:21:12 GMT, [email]johnd (AT) STRIP (DOT) autoartisans.com[/email] (John
Dammeyer) wrote:

Quote:
erewhon (AT) nowhere (DOT) com (J French) wrote:
The Registry is stored in two files both in c:windows
They are USER.DAT and SYSTEM.DAT

Thanks.

When the machine is booting you can insert something in AUTOEXEC.BAT
that can copy over those files
- when 98 is fully loaded those files cannot be written to, which is
just as well as they are cached up in RAM

I think you may be able to do everything you want from a batch file
invoked by AUTOEXEC.BAT and only triggered if a 'signal file' is
present


Perhaps a delsys.bat file called from autoexec.bat. If it's there
then it would delete the two .dat files. In Autoexec.bat, after
calling delsys.bat it would then delete delsys.bat.

Not delete - COPY c:windowsuser.hld c:windowsuser.dat

Here is something :-

cdwindows
c:windowscommandattrib -R -H -S SYSTEM.DAT
c:windowscommandattrib -R -H -S USER.DAT

IF NOT EXIST SYSTEM.HLD copy SYSTEM.DAT SYSTEM.HLD
IF NOT EXIST USER.HLD copy USER.DAT USER.HLD

copy SYSTEM.HLD SYSTEM.DAT
copy USER.HLD USER.DAT

cd

Quote:

Note that this could create problems if you send out new AX controls

Also I don't think you need to bother with InstallShield
- you can RegSvr32 stuff yourself
there is even a sneaky way to do it from within code


Do you know if the RegSvr32 modifies the registry? If it does, then
writing an app that does my specific registry entries is trivial.

It most certainly does modify the Registry
- probably easier and safer to re-register the controls

Quote:

Alternatively, perhaps creating a system recovery disk image that is
run from the JumpDrive?

If the JumpDrive is what I think it is, and is run through the USB,
then you need Win98 up and running to access the JumpDrive, but by
then it would be hard to run the recovery stuff

That's what I was thinking too after I pondered a bit more. Can't run
the USB as a drive till windows is up so it can't really be a boot
drive.

EXACTLY ! The old chicken and egg problem

Quote:


You could have a routine that copies the image to the machine, patches
AUTOEXEC.BAT and then restarts the machine
- when the machine is in DOS mode you can get up to some mischief
something like Ghost - or even use Int26h yourself
... but to restore an image from the same drive that the image is on
is tricky ...

Ghost inadvertantly trashed a couple of the internal flash cards and
so then the boxes needed to be taken apart and the cards pulled and
reformatted. That took them a while since the card wasn't recognized
so it wouldn't format.... catch-22.

Nasty - I wonder whether the Flash cards are running under some form
of TrueFlash (TFFS) - that could explain it

Hmm ... I wonder how you managed to run Ghost ?
- maybe a later version that does not insist on DOS mode
- or via some network connection

It would be nice if the cards could be easily removed

Quote:


If you could partition your internal RAM card it would make things
easier.

Also ... IME you need some sort of ROM based bootstrap so you can
configure a totally naked machine - that is how we did something
similar on a precursor to the PC104 design

That's a good point. I'll have my customer contact the hardware
manufacturer.

It is also just possible that there is a DOS driver for the JumpDrive

Also, such machines probably have a boot sequence of some sort
( a bit like booting from Floppy if present )

Quote:

It would be interesting to know more about your hardware

It's a Pentium 566MHz with a 640x480 LCD display in a waterproof
aluminium box held closed with some 32 screws that are locktite glued.
There are three water resistant plugs. One for AC power. Plug it in
and the system starts up. One for the 4-20ma intrinsically safe
internal module and one with a cover that has a USB connector inside.

Nice
Quote:

It's kind of a sophisticated chart recorder. One stripchart (ActiveX)
is from GlobalMajic (along with a button ActiveX control) and the
other I had to write from scratch in order to meet the customer
specifications.

The A/D is a 16 bit custom card that shoves data into an 8K FIFO at
1KHz. That gives me the freedom to pull the data out at the PC end on
their 55ms Timer ticks without worrying about the data integrity.

I'm not allowed to say much about the actual application but I
accumulate up to 2 minutes of data and then save that into a fixed
record size database. (Yes, it gets big and later on I'll rewrite it
to compress the data). The index of the database holds some key
information from the acquired data and that's what is plotted on the
GlobalMajic Stripchart.

I follow - sounds interesting

I work on touch screen systems for selling Duty Free onboard aircraft
- we have been through a few machines since I started in 1990
- once we built our own - it cost a fortune and never really worked
that well - power problems mainly

Back to top
Dragon Lord
Guest





PostPosted: Sun Feb 01, 2004 3:26 am    Post subject: Re: re-installing Delphi Application Reply with quote


"John Dammeyer" <johnd (AT) STRIP (DOT) autoartisans.com> wrote

Quote:
erewhon (AT) nowhere (DOT) com (J French) wrote:

If the JumpDrive is what I think it is, and is run through the USB,
then you need Win98 up and running to access the JumpDrive, but by
then it would be hard to run the recovery stuff

That's what I was thinking too after I pondered a bit more. Can't run
the USB as a drive till windows is up so it can't really be a boot
drive.

That must suck, my bios has support for USB devices. I have booted from a
USB drive once, but I normally don't.



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.