ChangeDirectory
The ChangeDirectory function sets the current directory.
Note:After you call ChangeDirectory to make a specified directory the current directory, that directory cannot be deleted. Before you can delete that directory, you must call ChangeDirectory again to set a different current directory.
Syntax
ChangeDirectory ( szPath );
Parameters
Parameter |
Description |
szPath |
Specifies the name of the directory to set as the current directory. That name can be either a fully qualified directory name or a UNC path; it must not include a trailing backslash. If necessary, call StrRemoveLastSlash before calling ChangeDirectory. Note:When you are specifying a file in your script, always specify the full path (using the appropriate InstallShield system variable, for example, SRCDIR) rather than depend on the current folder having the appropriate value. The script internally executes code that can change the current folder, so its value may not be what you expect. |
Return Values
Return Value |
Description |
0 |
ChangeDirectory successfully set the specified directory as the current directory. |
< 0 |
ChangeDirectory was unable to set the specified directory as the current directory. |