You can set custom commands to be executed before and after archiving of the source folder on this property page.
Enter the full path name of a local file of type, .exe, .cmd, .bat, or .ps1, to be executed before starting the archiving process. You may also optionally enter the command line argument below this path name field.
You may optionally enter the command line argument here to be passed during execution. The following internal variables are available in the command line argument. They will be replaced by their respective values before executing the command.
Select this option to abort archival of the source folder in case the command fails, i.e., it returns a value greater than zero.
Select this option to wait for the command to complete before starting archiving of the source folder.
Enter the full path name of a local file to be executed after the archival process is over, with or without success. You can also provide optional arguments for this command below.
Select this option if you want to execute the above command only on successful completion of archival of the source folder.
Select this option if you want to execute the above command only if there is some error completing the archival process, i.e., it was not successful.
You can use the above feature to run external commands before and after the archival process, like mounting and dismounting of encrypted container files. For example, the following PowerShell scripts can be used to mount and dismount a BitLocker encrypted VHD file. The mount command will be the full path name of the "mount-vhd.ps1" script file with argument as "-p MyPassword full_path_name_of_vhd_file", while the dismount command will be the full path name of "unmount-vhd.ps1" script file with argument as the full path name of the VHD file.
mount-vhd.ps1:
unmount-vhd.ps1:
For archival to a VeraCrypt container file, you can use the full path name of "VeraCrypt.exe" as both pre-task and post-task commands for mounting and dismounting the container. The arguments for mounting and dismounting the container will be "/m rm /nowaitdlg /q /s /p MyPassword /v full_path_name_of_veracrypt_container_file" and "/nowaitdlg /q /s /d {MrRoot}" respectively. You should also select "Abort on failure" and "Wait for completion" options for mounting, i.e., for pre-task command.