Q: How do I install .NET Framework?A: Include the Microsoft .NET Framework Redistributable Package (dotnetfx.exe) into your application, using the Files and Folders function. The file can be downloaded from the Microsoft Web site. Put it into some temporary folder at the Target Computer. During the installation, after a call to the DeployFiles function is performed (i.e. after the redistributable file of .NET is copied to the temporary folder) call it using the Exec function of the installation library. This will start the normal installation of .NET Framework.
We suggest the following method: 1) Create a separate package and put the .NET Framework redistributable file into it. Then link this package to your application’s package. In your application’s package you can check if the .NET Framework is already installed at the computer of the end user, and install the .NET package only if it is not yet installed.
2) When starting dotnetfx.exe using the Exec function, pass the True value as the second parameter to instruct LizaJet Installer to wait until installation of .NET Framework completes.
See the MDAC installation package to find out how to do it. You can download it form our site.
Another method is to download the .NET Framework redistributable file from the Microsoft Web site during the installation. For that purpose use the Download function of the installation library (see the Reference section of the help file). But in this case you can face a problem if Microsoft moves the file to some other location (a different URL).
Q: How can I install files to a folder specified in a registry key?A: In Studio, open the
Files and Folders function. Create a folder on the Target Computer panel. Specify a name of a parameter as the folder name. For instance, %TheFolder%. Put the files into that folder.
Q: How do I install OCX files?A: Include the OCX file into the package using the
Files and Folders function of Studio. Select this file in Studio and open the Properties dialog. Switch to the Advanced tab, and set the
Register COM / ActiveX library checkbox.
In the installation script, read the registry value before calling the DelpoyFiles function, and set the value of the parameter TheFolder to this value:
begin
Params[‘TheFolder’] := RegGetStrValue(HKEY_CURRENT_USER, ‘Software\MyCompany\MyApplication’, ‘Path’, ‘’);
DeployFiles;
end;
In this example, the files you put into %TheFolder% will be put in the folder pointed by the registry value Path from the HKEY_CURRENT_USER\Software\MyCompany\MyApplication key.
Q: How can I add a new line in autoexec.bat?A: You can use the standard Object Pascal library functions (AssignFile, Append, Writeln) to write the line. However, notice that these functions are defined in the standard library, not in the installer library, so they do not write anything to the installation log and thus the changes cannot be automatically undone when you uninstall the application.