@echo off

FOR /F "tokens=3 delims= " %%G IN ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal"') DO (SET docsdir=%%G)
Set docfolder="%docsdir%\ComponentOne Samples\Studio for ASP.NET Wijmo"
Set c=%docfolder%\\CommonDBs

pushd "%docfolder%\ASP.NET WebForms\CS\ControlExplorer"
  if not exist App_Data mkdir App_Data
    pushd App_Data
     XCOPY /y %c%\C1NWind.mdb C1NWind.mdb* 
     XCOPY /y %c%\C1NWind.mdf C1NWind.mdf*
     XCOPY /y %c%\C1NWind_log.ldf C1NWind_log.ldf*
    popd
popd

pushd "%docfolder%\ASP.NET WebForms\CS\HowTo\C1GridView_DialogEditing"
  if not exist App_Data mkdir App_Data
   pushd App_Data
    XCOPY /y  %c%\C1NWind.mdb C1NWind.mdb*
   popd
popd

pushd "%docfolder%\ASP.NET WebForms\CS\HowTo\C1ReportViewerChangeExportButtonBehavior"
  if not exist App_Data mkdir App_Data
   pushd App_Data
    XCOPY /y  %c%\C1NWind.mdb C1NWind.mdb*
   popd
popd

pushd "%docfolder%\ASP.NET WebForms\CS\HowTo\C1ReportViewerMVC"
   if not exist App_Data mkdir App_Data
    pushd App_Data
     XCOPY /y  %c%\C1NWind.mdb C1NWind.mdb*
    popd
popd 

pushd "%docfolder%\ASP.NET WebForms\CS\HowTo\C1ReportViewerPrintWithoutPreview"
   if not exist App_Data mkdir App_Data
    pushd App_Data
     XCOPY /y  %c%\C1NWind.mdb C1NWind.mdb*
    popd
popd 

pushd "%docfolder%\ASP.NET WebForms\CS\HowTo\C1ReportViewerPrintWithoutPreview"
   if not exist App_Data mkdir App_Data
    pushd App_Data
     XCOPY /y  %c%\C1NWind.mdb C1NWind.mdb*
    popd
popd

pushd "%docfolder%\ASP.NET WebForms\CS\iTunes"
   if not exist App_Data mkdir App_Data
    pushd App_Data
     XCOPY /y  %c%\Chinook.mdf Chinook.mdf*
     XCOPY /y  %c%\Chinook_log.LDF Chinook_log.LDF*
    popd
popd

pushd "%docfolder%\ASP.NET WebForms\CS\iTunes.4"
   if not exist App_Data mkdir App_Data
    pushd App_Data
     XCOPY /y  %c%\Chinook.mdf Chinook.mdf*
     XCOPY /y  %c%\Chinook_log.LDF Chinook_log.LDF*
    popd
 popd

pushd "%docfolder%\ASP.NET WebForms\CS\ToolkitExplorer"
   if not exist App_Data mkdir App_Data
    pushd App_Data
     XCOPY /y  %c%\C1NWind.mdb C1NWind.mdb*
    popd
popd

pushd "%docfolder%\ASP.NET WebForms\VB\HowTo\C1ReportViewerChangeExportButtonBehavior"
   if not exist App_Data mkdir App_Data
    pushd App_Data
     XCOPY /y  %c%\C1NWind.mdb C1NWind.mdb*
    popd
popd

pushd "%docfolder%\ASP.NET WebForms\VB\HowTo\C1ReportViewerPrintWithoutPreview"
   if not exist App_Data mkdir App_Data
    pushd App_Data
     XCOPY /y  %c%\C1NWind.mdb C1NWind.mdb*
    popd
popd

pushd "%docfolder%\ASP.NET MVC Tools\CS\MVCExplorer"
   if not exist App_Data mkdir App_Data
    pushd App_Data
     XCOPY /y  %c%\C1NWind.mdb C1NWind.mdf*
     XCOPY /y  %c%\C1NWind_log.ldf C1NWind_log.ldf*
    popd
popd
