Visual Basic ScriptsThis profile property enables you to run Visual Basic Scripts before and after a copy operation.
- Upon Profile Startup
- Upon Profile Completion
Start WithThis option enables you to specify the operation during which the script is to be started:
Wait TimeThis option enables you to specify that the script be automatically aborted after a certain number of seconds.
Requirements and Tips
- Visual Basic scripts can't be used with AllSync unless Microsoft Windows Scripting Host is installed on your computer. You can check this by running the sample script
- The properties and methods of the WScript object have to be called without "WScript." Example: Instead of
CreateObjecthas to be used.
- Some properties and methods of the WScript object, e.g.
Echo, cannot be used in the script or possess limited functionality.
- The error value -99 causes the profile to be aborted and no error message will be generated. See sample script
CheckDestinationDrive.vbs. You also can use a variable with the name
ExitCodeand set the value to
PlaceholdersThe following placeholders can be used inside the script:
|[SourceX]||[Source1] is replaced by the first source folder activated in the source folder list, [Source2] by the second one, etc.|
|[DestinationX]||[Destination1] is replaced by the first destination folder activated in the destination folder list, [Destination2] by the second one, etc.|
|[CopyToSource]||The amount of data in bytes to be copied from the destination to the source|
|[CopyToDestination]||The amount of data in bytes to be copied from the source to the destination|
Cancel profile if an error occursThis option causes the profile to be terminated if an error occurs in the script or the script cannot be run for launching the profile.
Sample ScriptsThe sample scripts supplied with AllSync are located in the
Scriptssubdirectory of the AllSync application folder. The sample scripts are continuously updated and adapted by us as needed. When making changes to the sample scripts, make sure to save them under a different name otherwise they will be overwritten and your changes lost the next time you update AllSync.
The following scripts are currently available:
Test.vbsThis script enables you to test the functionality of Microsoft Windows Scripting on your system and get an impression of the possibilities offered by Visual Basic Scripting.
Outlook.vbsThis script enables you to shut down Microsoft Outlook.
OutlookExpress.vbsThis script enables you to shut down Microsoft Outlook Express.
Run.vbsThis script enables you to run any program by inserting the
Prgvariable in the program path.
KillTask.vbsThis script enables you to end a task. Call Windows Task Manager to find out the requisite
ScreensaverOff.vbs \ ScreensaverOn.vbsThese two scripts enable you to respectively deactivate and reactivate your screensaver.
CheckDestinationFolder.vbsThis script checking the first destination folder to see if it exists. The script returns the error code -99 if the folder is not accessible. In conjunction with the option
Abort profile ...the profile will be aborted without any error message. The profile will be aborted and generate an error message if the script returns another error code than -99.