InstallShield 2018 » InstallScript Language Reference
The DeleteDir function deletes a subdirectory. Depending on the value you use in the parameter nFlag, you can delete a subdirectory only if it is empty, delete a subdirectory even if it contains files, or delete an entire root directory. Set nFlag with extreme caution.
Note • Note the following restrictions:
| • | You cannot use DeleteDir to delete the current directory. | 
| • | You cannot delete files on a network system where you lack the appropriate rights. | 
| • | DeleteDir cannot delete read-only, hidden, or system files. | 
| • | If DeleteDir encounters a read-only file, the function can fail after having deleted only some of the files in the subdirectory. | 
Syntax
DeleteDir( szDir, nFlag );
Parameters
| Parameter | Description | |||||||||
| szDir | Specifies the fully qualified name of the directory to delete. | |||||||||
| nFlag | Specifies deletion options. Pass one of the following predefined constants in this parameter: 
 
 
 | 
Return Values
| Return Value | Description | 
| 0 | Indicates that the function successfully deleted the subdirectory. | 
| < 0 | Indicates that the function was unable to delete the subdirectory. | 
See Also
| InstallShield 2018 Help LibrarySeptember 2018 | Copyright Information | Flexera |