Touch-Base Logo
Windows installation procedure

Occasionally we have reported issues with our Windows installer and following a recent problem with a customer installing on Windows Embedded 2009 we have created this article to document the install sequence of events to help identify any future install issues.
If the install fails before the GUI is seen then there are likely to be two error messages that pop up:



and / or



These are misleading as they suggest a problem in the API. In fact what has happened is that an error in the installer bootstrap process has occurred. 
This error is not reported correctly an as a result the installer continues assuming the required files are in place and gives the messages above when the first API call fails. 
The problem appears to have 2 underlying causes. The program used to manage CAB files appears not to work correctly on some systems. We have not identified the root cause of this but we no longer ship this module and instead use the version shipped with the operating system. (Previously we shipped this module as the O/S versions varied and required differing arguments, limited tests on current versions of Windows show that this appears to longer be an issue). 
An issue with the Windows CreateProcess API leads to issues with quoted arguments. We have changed the arguments passed to work correctly with current versions of expand.exe. 
The following is a description of the updd installer for Windows bootstrap process with UPDD 5.1.nnnn. 
The user runs the installer, setupNN_05.01.NNNN.exe 
This program holds all the required files for the installation. These files are embedded in a series of CAB  files, which in turn are embedded as Windows binary resources. 
The bootstrap process extracts the files required to launch the graphical installer as follows. 
The folder %temp%tbtemp is created. 
The file setup.cab is extracted as %temp%tbtemp\setup.cab
This file is in turn expanded with its files copied to %temp%tbtemp 
Using a command like
expand -r "C:\Users\Gary\AppData\Local\Temp\tbtemp\setup.cab" -F:* "C:\Users\Gary\AppData\Local\Temp\tbtemp"
Of course the actual location of the temp folder varies according to the system being installed to. 
The current working directory is set to %temp%tbtemp when this command is executed. 
The actual set of files installed can varies according to the updd package (bundle) and is subject to change but at the time of writing this is a typical set up files used for the bootstrap process. 

C:\Users\Gary\AppData\Local\Temp\tbtemp\ACE_updd_5.6.2.dll   -- 3rd party cross platform support used by api for IPC and synchronisation 
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu.exe                  -- provides the GUI for the installer 
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_ar.qm               -- one qm for for each supported language to allow the GUI  to be localised 
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_ch.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_cs.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_ct.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_da.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_de.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_el.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_es.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_fi.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_fr.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_he.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_hi.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_hu.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_it.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_ja.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_jp.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_ko.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_lv.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_nb.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_nl.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_pl.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_pt.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_ru.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_sv.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_tr.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\dcu_zh.qm
C:\Users\Gary\AppData\Local\Temp\tbtemp\ilogo.png               -- image for branding on the GUI 
C:\Users\Gary\AppData\Local\Temp\tbtemp\licence-de.txt        -- licence files in various languages
C:\Users\Gary\AppData\Local\Temp\tbtemp\licence-en.txt
C:\Users\Gary\AppData\Local\Temp\tbtemp\licence-fr.txt
C:\Users\Gary\AppData\Local\Temp\tbtemp\licence-ja.txt
C:\Users\Gary\AppData\Local\Temp\tbtemp\licence-ru.txt
C:\Users\Gary\AppData\Local\Temp\tbtemp\logo.PNG              -- image for branding on the GUI 
C:\Users\Gary\AppData\Local\Temp\tbtemp\mousel.png           -- image used by installer, probably redundant will be considered for removal in a later version
C:\Users\Gary\AppData\Local\Temp\tbtemp\mouser.png          -- image used by installer, probably redundant will be considered for removal in a later version
C:\Users\Gary\AppData\Local\Temp\tbtemp\msvcrt.dll             -- C run time library 
C:\Users\Gary\AppData\Local\Temp\tbtemp\qjpcodecs4.dll       -- codec file used by Qt for Japanese support (note that the file is extracted to this location but then copied to the location noted below) 
C:\Users\Gary\AppData\Local\Temp\tbtemp\Qt3Support4.dll     -- Qt 4 libraries used by the GUI 
C:\Users\Gary\AppData\Local\Temp\tbtemp\QtCore4.dll
C:\Users\Gary\AppData\Local\Temp\tbtemp\QtGui4.dll
C:\Users\Gary\AppData\Local\Temp\tbtemp\QtNetwork4.dll
C:\Users\Gary\AppData\Local\Temp\tbtemp\QtSql4.dll
C:\Users\Gary\AppData\Local\Temp\tbtemp\QtXml4.dll
C:\Users\Gary\AppData\Local\Temp\tbtemp\reenum.exe          -- helper tool to force redetection of PnP devices. 
C:\Users\Gary\AppData\Local\Temp\tbtemp\setup.cab            -- the original container for all these files 
C:\Users\Gary\AppData\Local\Temp\tbtemp\TBUPDD.INI          -- settings for this UPDD package 
c:\Users\Gary\AppData\Local\Temp\tbtemp\codecs\qjpcodecs4.dll   -- codec file used by Qt for Japanese support, Qt requires this oto be in a subdirectory “codecs” 

With the files in place the GUI can now run. Unless a silent install is in progress the GUI is launched with the command 
dcu /install
The setup program waits for completion of the GUI and then extracts the remaining files and performs the remaining actions to configure the software. 
The actual set of files extracted is not fixed. The installer looks for numbered resources > 8000 but excluding that with the name of setup_cab. 
For each found the file is extracted to a sub folder based on the name, eg 
Resource MAINDIR_CAB is extracted to %temp%tbtemp\maindir\maindir.cab and its contents in turn extracted to  %temp%tbtemp\maindir. 
The installer later copies the files from the extracted folders to appropriate locations and at the end the folder %temp%tbtemp is removed along with all its contents. 

A  typical set of cab files is as follows: 
…\temp\tbtemp\setup.cab                        -- the bootstrap files described above
…\temp\tbtemp\DRV32_1.cab                    -- driver files to install to %windir%\system32\drivers
…\temp\tbtemp\MAINDIR1.cab                   -- application files to install to %programfiles%\updd 
…\temp\tbtemp\SYSDIR1.cab                    -- system files to install to %windir%
…\temp\tbtemp\WINDIR1.cab                    -- system files to install to %windir%\system32 (currently not used) 
…\temp\tbtemp\MAINDIR\HELP1.cab           -- html files for the help system
…\temp\tbtemp\MAINDIR\HELPI1.cab          -- image files for the help system 

Note that multi part cab files use the names file<N>.cab so for example MAINDIR1.cab above is the first part of a potential multi part CAB file MAINDIR.cab
In the current version the size of a cab file part is limited to 1GB so unlikely to be reached; but the multipart naming is retained from previous versions were a lower thresholds was needed.




Details
Last Modified:29/07/2014 17:24:34

Last Modified By: Dave Bhattacharjee

Type: INFO

Article has been viewed 3,005 times.

Options