5 out of 5 rated this helpful - Rate this topic

Planning the Installation

When the installation of an existing application is moved to Windows Installer from another setup technology, the setup developer may start authoring a Windows Installer package using the source and target file images of the existing installation. A detailed plan of how the files and other resources are organized at the source and target is also a good starting point for developing a package for a new application.

The sample installation package takes the following files that are stored at the source location for the application and installs them to the target on the user's computer.

FileDescriptionPath to sourcePath to target
Redpark.exeText editor executable file.C:\Sample\Notepad\Redpark.exe[ProgramFilesFolder]\Red_Park\Redpark.exe
Readme.txtAn informational file.C:\Sample\Notepad\Readme.txt[ProgramFilesFolder]\Red_Park\Readme.txt
Help.txtHelp manualC:\Sample\Notepad\Help.txtNot installed. Always run-from-source.
Baseball.txtBaseball game schedule for year 2000.C:\Sample\Notepad\Events\Baseball.txt[ProgramFilesFolder]\Red_Park\Sports\Baseball.txt
Football.txtFootball game schedule for year 2000.C:\Sample\Notepad\Events\Football.txt[ProgramFilesFolder]\Red_Park\Sports\Football.txt
Dance.txtDance performances for year 2000.C:\Sample\Notepad\Events\Dance.txt[ProgramFilesFolder]\Red_Park\Arts\Dance.txt
Concert.txtMusic performances for year 2000.C:\Sample\Notepad\Events\Concert.txt[ProgramFilesFolder]\Red_Park\Arts\Concert.txt
January.txtAdmissions in January of year 2000.C:\Sample\Notepad\Gate\January.txt[ProgramFilesFolder]\Red_Park\Gate\January.txt
NewYears.txtAdmissions on New Years Day of year 2000.C:\Sample\Notepad\Gate\Holidays\NewYears.txt[ProgramFilesFolder]\Red_Park\Gate\NewYears.txt

 

The sample writes the following values in the user's registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Notepad Sample.

NameValue
lfCharSet0
lfClipPrecision2
lfFaceNameFixedSys
lfItalic0
lfOrientation0
lfOutPrecision1
fSavePageSetting0
lfPitchAndFamily49
iPointSize120
lfQuality2
lfStrikeOut0
lfWeight400
fWrap0

 

The sample installs the following shortcuts. One of these shortcuts may be selected during setup as an advertised shortcut so that the user can install-on-demand the Baseball feature.

NameShortcut locationShortcut target
sNotepad[ProgramFilesFolder]\Red_Park\Menu\[ProgramFilesFolder]\Red_Park\Redpark.exe
sReadme[ProgramFilesFolder]\Red_Park\Menu\[ProgramFilesFolder]\Red_Park\Readme.txt
sHelp[ProgramFilesFolder]\Red_Park\Menu\[ProgramFilesFolder]\Sample\Notepad\Help.txt
sBaseball[ProgramFilesFolder]\Red_Park\Menu\[ProgramFilesFolder]\Red_Park\Sports\Baseball.txt
sFootball[ProgramFilesFolder]\Red_Park\Menu\[ProgramFilesFolder]\Red_Park\Sports\Football.txt
sDance[ProgramFilesFolder]\Red_Park\Menu\[ProgramFilesFolder]\Red_Park\Arts\Dance.txt
sConcert[ProgramFilesFolder]\Red_Park\Menu\[ProgramFilesFolder]\Red_Park\Arts\Concert.txt
sJanuary[ProgramFilesFolder]\Red_Park\Menu\[ProgramFilesFolder]\Red_Park\Gate\January.txt
sNewYears[ProgramFilesFolder]\Red_Park\Menu\[ProgramFilesFolder]\Red_Park\Gate\NewYears.txt

 

To reproduce the sample, begin by creating the source directory structure given in the first table. You can make a copy of your system's Notepad.exe file and then rename this copy Redpark.exe. Use the Notepad editor to create the remaining text files. The directory structure of the target, the registry values, and the shortcuts are added by authoring the installation database.

Continue

 

 

Build date: 11/30/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.