Dynamic
Path Relocation |
Previous Top Next |
Windows
XP Side-by-Side DLLs are migrated to Windows Vista Side-by-Side
DLLs automatically depending on the platform you are running on
|
If you
capture an application that uses SxS DLLs on NT/2k/XP/w2k3 it will
install SxS DLLs to a path location differently than when installed
on Vista. Thinstall dynamically moves these SxS during the
application startup if the platform has changed. Using Thinstall's
Dynamic Path relocation, you can create one package that works on
all platforms. |
|
Many
applications will access files using Shell folder locations, for
example applications typically call GetWindowsDirectory to obtain
the path to c:\windows instead of using a hard coded path. On
different versions of Windows the system directory will be located
in different locations. For example c:\winnt is used for NT and
Windows 2000 by default, as well the user can select an alternate
directory during installation of Windows. Applications will also
typically use shfolder.dll to obtain the path various "shell
folder" locations like c:\program files and c:\documents and
settings\username. For a complete list of shell folder paths, see
FolderMacros. |
|
An
example is Macromedia flash which installs to
c:\windows\system32\macromed\flash. At runtime, flash uses
GetWindowsDirectory to obtain the partial path c:\windows\system32,
and then appends macromed\flash to obtain the location of it's
install directory. As well, flash uses a registry value which
corresponds to this location: |
|
HKEY_CLASSES_ROOT\CLSID\{1171A62F-05D2-11D1-83FC-00A0C9089C5A}\InprocServer32
|
DefaultValue
= C:\WINDOWS\system32\Macromed\Flash\Flash9b.ocx |
|
When
running an application that installs Macormedia Flash dynamically
or during the capture process (for example Firefox or Internet
Explorer), the registry stores the path C:\WINDOWS\system32 and
files are written to c:\windows\system32\macromed\flash.
|
If the
application is moved to another PC where the windows root directory
is different (for example c:\winnt windows 2000), it will fail to
work unless both the files and registry keys are remapped to point
to c:\winnt. |
Thinstall's
virtual filesystem stores file paths using Folder Macros, so the file paths will
automatically expand to the correct location on different PCs. As
well, Thinstall stores registry data using the same Folder Macros,
so that registry values automatically re-adjust to point to the
correct location on a different PC. For example, when the
application writes the registry value C:\WINDOWS\system32\Macromed\Flash\Flash9b.ocx,
Thinstall stores this internally as %SystemSystem%\Macromed\Flash\Flash9b.ocx.
When
the application queries for this value, it will transparent expand
back to C:\WINDOWS\system32\Macromed\Flash\Flash9b.ocx
when
running on Windows XP/2k3/Vista and C:\winnt\system32\Macromed\Flash\Flash9b.ocx
when
running on Windows 2k and NT. |
Thinstall
intercepts all data written to the registry and sees if there are
references to short pathnames or shell folders. If there are, it
will internally store the registry data in macro format so that the
data re-expands to the correct location on other PCs. This
functionality is described in more detail in the Short Pathnames sections.
|