WinDeveloper Software
Innovation. The seed to our Solutions
Follow us on Twitter WinDeveloper on Facebook WinDeveloper YouTube Channel WinDeveloper Updates
WinDeveloper O365 Mailer FREE for 1 Year
WinDeveloper O365 Mailer FREE for 1 Year



Configuring Automated Exports using Windows Task Scheduler

This article describes how to setup periodic exports with 'VSS Data Export' and the Windows2000 Task Scheduler. If you are running a different Windows version the procedure should be very similar and this article is still recommended as a reference.

  1. From the 'Control Panel' open 'Scheduled Tasks' 
  2. Select Add Scheduled Task. 

Select Application  

  1. Following the Welcome  Step, the Wizard lists the installed applications. Scroll the list to select 'VSS Data Export' and click Next.

Select Time Schedule

  1. Select how often should the export be performed between daily, weekly etc. You will want to keep this period short enough so as the Export data is kept up-to-date. Hence here we set this to 'Daily'. Click Next.

Select Time

  1. Select the exact time when the export should be performed and the starting date for this task. It is always best to choose a time when little changes are going on within VSS. In this manner developers will have a good reference of the last sync time. Here I set the time to 1:00AM so as each working day starts from a fresh set of data. Click Next.

Enter Credentials

  1. Specify the user login credentials under whom VSS Data Export will be run. It is best if you choose a user who has enough access rights over VSS and SQL server (if exporting to an SQL server) so as to perform an export. In this manner you will avoid specifying any passwords as command line parameters later on. Click Next.

Completion of Task Wizard

  1. In the last wizard step set "Open Advanced Properties..." check box and click Finish.

    The task property-sheet will open. You will be able to open this anytime from Control Panel\Scheduled Tasks by double clicking the task. From here you can modify all the properties set by the wizard. 

    Task Advanced Settings

    IMPORTANT!! Most importantly here we want to change the application command line settings at the 'Run' edit box. Otherwise VSS Data Export would be launched in interactive mode!! Interactive mode will cause the VSS Data Export task to hang silently.

    To determine the exact set of parameters you want to specify refer to the 'Command-Line Export' help from the application program group. You should always specify at least the /QUIET OFF parameter sequence to run the application in command line non-interactive mode.  


back to top

Important notes on VSS Data Export command-line

Running the application with /QUIET ON is very useful to test the application command line operation. Once the correct set of parameters are determined you will always want to use /QUIET OFF. As explained in the 'Command-Line Export' documentation you can choose to use the last configured set of settings to perform the export. This is fine when the application is used exclusively by the task scheduler. Still if you sometimes perform one-off exports under different configuration settings this can be cause of problems unless you always make sure to restore the settings correctly. Hence in general it is always safer to specify all the parameters at the command-line. 

Take extra care when dealing with the user credential parameters. VSS Data Export never saves passwords. If you need to explicitly set the user login name and password for VSS or SQL you should also include the /VSSPass and /SQLPass parameters. Specifying passwords on command line parameters is of course dangerous since anyone having access to the Task Scheduler will be able to see these. 

A much more secure method is to use Windows Integrated security. In this case you will need to make sure that the user credentials under which the task is running has enough access rights to retrieve data from VSS and to write the data to the target database. If such access right level is satisfied, then just setting /VSSUsr and for SQL /SQLNTSec will be enough. Set /VSSUsr to the same user under whom the task is running. So if the Task 'Run As' user is set to WINDEVELOPER\Administrator the parameter sequence should be specified as:
/VSSUsr Administrator

back to top

Testing/Troubleshooting the Scheduler Task

It is always good to test the scheduled task since it is easy to leave out or mis-configure some parameters. To Run the task immediately right-click the task from Control Panel\Scheduled Tasks and select Run. Check if the data was successfully exported to the target database. If the export does not work as expected check the following:

  1. Make sure the /QUIET OFF parameter sequence was specified (see above for details). If these parameters were not specified you are likely to have an instance of the application hanging in the background which you may terminate through the Task Manager as follows:

    Task Manager


    • Run: taskmgr.exe
    • Under the Processes tab select the vss2mdb.exe process.
    • Click on End Process.


  2. Check the export report file <VSS Data Export dir.>\ExportResult.txt

    VSS Data Export Text Report


    • From the file header Date and Time values make sure that the log file does refer to the export triggered by the task.
    • If the file header Date/Time values do not match with the time when the task was run, then the application was not launched at all. Make sure that the application path at the task properties is correct.
    • If the Date/Time match, move to the file end. Identify the error reason. This will normally report which parameter caused the failure. Otherwise it could report errors returned by VSS or the destination database interface. From this error you can normally work out how to solve the problem.


  3. Try to run the full command-line as specified in the task from the command prompt as follows:

    • Logon the server using the same user credentials as specified for the Task.
    • Open the command prompt.
    • From the task properties copy the 'Run:' value to the command prompt.
    • Change the /QUIET ON parameter to /QUIET OFF
    • Run the command-line.
    • The application will now report any problems in pop-up windows.


back to top



Privacy Policy Partners About Us Contact

Copyright © 2004 - 2022 WinDeveloper Software Ltd. All rights reserved.