How to write-protect a file after installation

Sometimes it is necessary to write-protect a file after it has been installed on a hard drive. If you use Visual Installer to install your files, this is very easy done if you follow these steps:

1. Open your project file or create a new one.
2. In the File list tab, select the file that you want to write-protect.
3. Choose the List – File copy options menu item.
4. Select the Turn on write protection option:

The 'Copy Options' dialog box (1)

5. Click OK.

If you want to be able to update the write-protected file during a future update, you can also select the Replace also write protected file option:

The 'Copy Options' dialog box (2)

Now when you install your files, the file that you selected at step 2 above, will be write-protected after the installation. You can check that this really works as expected by right-clicking on the file in Windows Explorer and thereafter choosing the Properties menu item in the local menu that is shown. In the General tab in the Properties dialog box, the Read-only check box should be checked (as shown in the picture below):

The 'Properties' dialog box

See also
> How to set file copy options in Visual Installer
> The ‘Inst’ column in the ‘File list’ tab in Visual Installer