Customizing an uninstall with Install.log
|Article:HOWTO2634|||||Created: 2006-03-06|||||Updated: 2007-10-24|||||Article URL http://www.symantec.com/docs/HOWTO2634|
How do I customize my uninstall with Install.log?
You can easily and quickly customize the uninstall process in script-based installations. The Uninstall page in Installation Expert lets you delete files and registry keys or execute a program during the uninstall process. You can also create additional customization not available from the Uninstall page by using the Add Text to Install.log script action in Script Editor.
When your installation script runs, the Install.log file records each script action. During the uninstall process, the script begins processing at the end of the Install.log file and works its way up, undoing each of the actions listed in the file. Keep this in mind when determining the location of the text you add to the Install.log file. This article details how you can use the Add Text to Install.log action to undo several of the actions included in a common script-based installation. If the actions were included in the installation, wouldn't they already be in the log file? You might think so, but the user may want to delete additional files, registry keys, and so on. For more information, on the Add Text to Install.log action, see the topic titled Add Text to Install.log in the online help.
To delete an individual file (including a shortcut or a font), add the following text to the Install.log file:
where is the full path to the file on the destination computer. This path can include variables such as %SYS32%.
To delete multiple files or any number of directories (including subdirectories), add the following text to the Install.log file:
where is the full path to the files or the directory on the destination computer. This path can include variables such as %SYS32%, and can contain wildcards when referring to files.
File Copy: %WIN%\file.txt
File Copy: %FONTS%\font.ttf
File Tree: C:\Directory\*.txt
File Tree: C:\Directory
File Tree: C:\Documents and Settings\All Users\Desktop\shortcut.lnk
If a directory empties because of files deleted during the uninstall process, the uninstall process deletes the empty directory. While the uninstall process deletes the font file immediately, it might not disappear right away from the list of fonts shown in the Fonts applet of the Control Panel. To refresh the list of fonts, close and re-open the Fonts applet.
To delete a service, add the following text to the Install.log file:
Create Service: ClipSrv
Create Service: ClipSrv
To delete an individual item from an INI file, add the following text to the Install.log file:
- INI File:
INI Sect: INI Item: INI Val:
- INI File: %WIN%\Wise.ini
- INI Sect: Settings
- INI Item: DefaultTemplate
- INI Val: Empty Project
- Undo: Edit Registry
To delete an entire registry key and all of its subkeys, add the following text to the Install.log file:
- RegDB Tree:
- 0 - HKEY_CLASSES_ROOT
- 1 - HKEY_CURRENT_USER
- 2 - HKEY_LOCAL_MACHINE
- 3 - HKEY_USERS
To delete a particular registry value, add the following text to the Install.log file:
- RegDB Key:
RegDB Val: RegDB Name: RegDB Root:
To execute a program during the uninstall process, add the following text to the Install.log file:
Note: There is a known issue regarding the addition of "Execute Program:
Execute Program: %SYS32%\notepad.exe "C:\Program Files\Test.txt"
Execute Program: C:\Program Files\Internet Explorer.exe http://www.wise.com
Execute Program: %SYS32%\calc.exe
Execute Program: %SYS32%\notepad.exe
Execute Program: C:\Program Files\Internet Explorer.exe
Note: Any program executed during the uninstall process executes before any other actions, regardless of where the Execute Program action exists in the log. You can only execute one external program during the uninstall process.
Adding lines of text to the Install.log file lets you tailor an uninstall to your specifications. By using the information detailed above, you can quickly provide additional customization for your uninstall.
Article URL http://www.symantec.com/docs/HOWTO2634