Tuesday, May 18, 2010

Macro strings in file registry settings


When we hard code some paths for a CAB file we can have some problems if the user is installing in the application on an external memory or if it is installed on a different language.
To avoid this problem we can use Macro Strings.
They way these macro strings work is that if you specify a registry value like %InstallDir% the CAB installation process will replace the %InstallDir% part of your string with the device’s specified installation directory.

This is a list of some of the string macros on English devices:


%InstallDir% [directory application installed into]
%AppName% [name of application]
%CE1% \Program Files
%CE2% \Windows
%CE4% \Windows\StartUp
%CE5% \My Documents
%CE8% \Program Files\Games
%CE11% \Windows\Start Menu\Programs
%CE14% \Windows\Start Menu\Programs\Games
%CE15% \Windows\Fonts
%CE17% \Windows\Start Menu

No comments:

Post a Comment