x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

CAB / Persistent Install on x86 Thin Client - RAM / Flash Memory

torch Page Icon Posted 2023-01-21 5:24 AM
#
Avatar image of torch
Subscribers
H/PC Guru

Posts:
5,713
Location:
United States 
Status:
I found this great article explaining CAB installations on Thin Clients - where the RAM / Flash storage is shared. Maybe useful for the CESD
I'll quote it below and link at the end

Quote
Introduction

We will consider the purposes of the Windows Cabinet files, the specific of software installation on Windows CE devices and the way to execute C++ code during the installation process. Also we will create a sample CAB installation in Visual Studio 2008.

The information provided below is based on the experience of the work with Hewlet-Packard Windows CE thin clients. In spite of the fact that the CAB installation procedure on Windows CE devices from different vendors has many common parts some aspects described in this article may differ on non-HP thin clients.

Table of Contents

Addons Installation Mechanism on Windows CE Thin Clients
Specific of the CAB Installation on Thin Clients
Additional Installation Actions and Setup.dll
Creating CAB Installation in MS Visual Studio
Summary
Bibliography.
Addons Installation Mechanism on Windows CE Thin Clients

To install additional applications on Windows CE based thin clients, it is convenient to use some kind of installer.

Most of the Windows CE distributions support the installations by means of the Windows Cabinet (.cab) files (http://msdn.microsoft.com/en-us/library/bb158712.aspx). Basically such Cabinet file contains the archived application binaries and the instructions on where to unpack archive contents; and also information about the changes that should be performed to the system registry.

During the .cab-installation on the thin client the corresponding record is created in the View or Remove Programs applet menu. Also the .unload script file is generated in the \Windows directory. It will be used during the uninstallation procedure.
Specific of the CAB Installation on Thin Clients

The typical Windows CE thin clients are equipped with the flash memory which is used both as RAM and the hard disk. The thin client file system is divided into the part stored in persistent memory and the part mounted on RAM. The former exists permanently and the latter is erased during each system reboot. This may be a little inconvenient as some important system folders are mounted on RAM. Of course their content is restored on each reboot using the information from persistent memory but if you have placed some important files to one of those folders you’ll have to take some precautions to not to lose them.

The persistent memory items are typically mounted in the \Hard Disk or similarly named folders in the root directory. The rest of items mounted under the root are the RAM items.

So it is preferable that you configure your .cab installation to unpack the binaries to one of the persistent folders inside the \Hard Disk directory. For example, \Hard Disk\Program Files\MyApplication would be a good option.

Then you will have to secure the .unload script file generated upon your installation. It will be created at the end of the installation process in the \Windows folder. This folder is mounted on RAM so its content will be erased on the next reboot and you won’t be able to uninstall your application with the View or Remove Programs applet afterwards.

To avoid this, you can use \Hard Disk\ramroot system folder. Its content is automatically copied to the root folder on each system start. So if you copy your .unload script to \Hard Disk\ramroot\Windows upon the installation, it will be automatically restored in the \Windows folder after each reboot. If some other binaries of your application must be installed to \Windows folder, you must make sure that you have placed their copies to \Hard Disk\ramroot\Windows as well.

Another important topic is your application registry settings.

During the CAB installation the corresponding registry keys are first created in the RAM registry and then copied to the so-called hive-based registry in the persistent memory.

The HP thin clients have the “Reset to Factory Defaults” option. During this operation the file system binaries stay intact but the hive-based registry in the persistent memory is erased and then rebuilt using the default OS image. If your application has stored some configuration data in the registry, you will lose it during this operation. Also you will lose the installation registry record.

To avoid this you can use the \Hard Disk\Defaults folder. When the OS determines, during boot, that the hive-based registry has been deleted, it will look in the \Hard Disk\Defaults folder for any registry data that it should add to the reconstruction.

The Defaults directory simply contains a collection of registry text files (*.reg). So you just have to create the .reg file containing your application registry data and copy it to the \Hard Disk\Defaults folder during the installation.


Original Article

Edited by torch 2023-01-21 5:24 AM
 Top of the page
I dunk for bananas Page Icon Posted 2023-01-23 1:37 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
702
Location:
Europe
Status:
I was wondering, does re-copying all those files with every start of the system wear down the system's flash memory noticeably? Especially in the case of a compact flash hard drive
 Top of the page
C:Amie Page Icon Posted 2023-01-23 2:32 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,976
Location:
United Kingdom
Status:
It depends on the CF card, how many bits per cell on the NAND flash and the warranty length. Depending on the card, assuming that it's a MLC NAND flash device with a 5 year warranty, I'd guess it supports between 1 and 3 Drive Writes Per Day. Probably close to 1 - 1.5 DWPD for any consumer grade CF. Getting hold of the info from the manufacturer won't be easy.

In other word, it it is a 4GB card with a 1 DWPD, 5 year warranty, you can write 4GB in 24 hours, every 24 hours and expect it not to be dead until some time after year 5.
 Top of the page
I dunk for bananas Page Icon Posted 2023-01-23 3:02 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
702
Location:
Europe
Status:
Quote
C:Amie - 2023-01-23 2:32 PM

It depends on the CF card, how many bits per cell on the NAND flash and the warranty length. Depending on the card, assuming that it's a MLC NAND flash device with a 5 year warranty, I'd guess it supports between 1 and 3 Drive Writes Per Day. Probably close to 1 - 1.5 DWPD for any consumer grade CF. Getting hold of the info from the manufacturer won't be easy.

In other word, it it is a 4GB card with a 1 DWPD, 5 year warranty, you can write 4GB in 24 hours, every 24 hours and expect it not to be dead until some time after year 5.


That makes sense, though in this case it would only be copying from the CF, and writing to the system's RAM, would that make a difference?
 Top of the page
C:Amie Page Icon Posted 2023-01-23 3:10 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,976
Location:
United Kingdom
Status:
Reads don't matter, it's only writes that are destructive.
 Top of the page
I dunk for bananas Page Icon Posted 2023-01-23 4:20 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
702
Location:
Europe
Status:
That's fine then, I think!
 Top of the page
Jump to forum:
Seconds to generate: 0.125 - Cached queries : 64 - Executed queries : 8