Непонятки какие то, после запуска пишет в лог
Looking for files...
и вылетает безо всяких предупреждений...
от чего такое может быть?
Код: set OUTPUT=logfile.log
set folderclear1=c:\tmp\cd1\
set folderclear2=c:\tmp\cd2\
set text1clear=c:\tmp\cd1\text1.txt
set text2clear=c:\tmp\cd2\text2.txt
set isodisk1=c:\tmp\cd1.iso
set isodisk2=c:\tmp\cd2.iso
set text3txt=c:\tmp\text3.txt
set passtext3=c:\tmp\passtext3.txt
set passfile1=c:\tmp\pass.txt
rem Сетевая папка.
set netdisk=\\ekf.int\ekf\Secur
rem Файлы на сетевом диске.
set netpass=Y:\TMF\pass.txt
set netpasstext3=Y:\TMF\passtext3.txt
set text1copy=Y:\TMF\text1.txt
set text2copy=Y:\TMF\text2.txt
set text3copy=Y:\TMF\text3.txt
Title Looking for files...
color 0C
echo. >>%OUTPUT%
echo. >>%OUTPUT%
echo. >>%OUTPUT%
echo ------------------------------------------------------------------>>%OUTPUT%
echo Process start %DATE% %TIME% >>%OUTPUT%.
echo ------------------------------------------------------------------>>%OUTPUT%
echo %TIME% Looking for files...
echo Looking for files...>>%OUTPUT%
rem Удаляем все файло перед началом.
For %%a IN ("c:\tmp\pass.txt") do (
if exist %%a (
echo File %%a exist!>>%OUTPUT%
echo %TIME% Deleting file %%a>>%OUTPUT%
echo.>>%OUTPUT%
del /q %%a
) else (
echo %TIME% File %%a not exist >>%OUTPUT%
)
rem Очищаем папки для записи все
del /q %folderclear1%*.*
del /q %folderclear2%*.*
Title Preparing to copy files...
color 0C
echo Preparing to copy files...
echo Mounting network disks...
echo Mounting network disk with files >>%OUTPUT%
net use y: %netdisk%
if errorlevel 2 goto itis
if errorlevel 0 goto gotit
:itis
echo The local device name is already in use. >>%OUTPUT%
echo. >>%OUTPUT%
echo. >>%OUTPUT%
goto outo
:gotit
echo Mounting network disk Success! >>%OUTPUT%
echo. >>%OUTPUT%
goto outo
uto
cls.
rem Стартуем SQLEXPRESS
Title Starting SQL
echo Starting SQLEXPRESS
echo. >>%OUTPUT%
echo %TIME% Starting SQLEXPRESS Service!>>%OUTPUT%
net start "SQL Server (SQLEXPRESS)"
if errorlevel 0 (
echo %TIME% SQLEXPRESS Service Started!
echo %TIME% SQLEXPRESS Service Started! >>%OUTPUT%
echo. >>%OUTPUT%
) else (
echo %TIME% SQLEXPRESS Service Start failed! >>%OUTPUT%
echo. >>%OUTPUT%
echo %TIME% SQLEXPRESS Service Start failed!
pause.
)
cls.
rem Копируем себе файлы с контейнерами.
echo %TIME% Start Prepare files for recording....>>%OUTPUT%
echo. >>%OUTPUT%
echo %TIME% Search for existing files in Directory...>>%OUTPUT%
echo.>>%OUTPUT%
title Prep files for record
echo %TIME% Prep files for record
cls.
title Copying text files
echo Copy Crypto containers to local host..... >>%OUTPUT%
echo %TIME% Copying text1.txt....>>%OUTPUT%
echo %TIME% Copying text1.txt....
xcopy %text1copy% %folderclear1% /Y
if errorlevel 4 goto lowmemory
if errorlevel 2 goto abort
if errorlevel 1 goto err
if errorlevel 0 goto good
:lowmemory
echo Insufficient memory to copy files or >>%OUTPUT%
echo Insufficient memory to copy files or
echo invalid drive or command-line syntax. >>%OUTPUT%
echo invalid drive or command-line syntax.
pause.
goto out
:abort
echo You pressed CTRL+C to end the copy operation. >>%OUTPUT%
echo You pressed CTRL+C to end the copy operation.
pause.
goto out
:err
echo Files for copying are not found.>>%OUTPUT%
echo Files for copying are not found.
echo.>>%OUTPUT%
pause.
goto out
:good
echo.>>%OUTPUT%
echo %TIME% File text1.txt copied success ! >>%OUTPUT%
echo.>>%OUTPUT%
echo %TIME% File text1.txt copied success !
goto out
ut
if errorlevel 4 exit.
if errorlevel 2 exit.
if errorlevel 1 exit.
rem _____________________________________________________
rem ======================================================
rem _____________________________________________________
echo.>>%OUTPUT%
echo %TIME% >>%OUTPUT%
echo %TIME% Copying text2.txt....>>%OUTPUT%
echo %TIME% Copying text2.txt....
xcopy %text2copy% %folderclear2% /Y
if errorlevel 4 goto lowmemory1
if errorlevel 2 goto abort1
if errorlevel 1 goto err1
if errorlevel 0 goto good1
:lowmemory1
echo Insufficient memory to copy files or >>%OUTPUT%
echo Insufficient memory to copy files or
echo invalid drive or command-line syntax. >>%OUTPUT%
echo invalid drive or command-line syntax.
pause.
goto exit1
:abort1
echo You pressed CTRL+C to end the copy operation. >>%OUTPUT%
echo You pressed CTRL+C to end the copy operation.
pause.
goto exit1
:err1
echo Files for copying are not found.>>%OUTPUT%
echo Files for copying are not found.
echo.>>%OUTPUT%
pause.
goto exit1
:good1
echo.>>%OUTPUT%
echo %TIME% File text2.txt copied success ! >>%OUTPUT%
echo %TIME% File text2.txt copied success !
echo.>>%OUTPUT%
goto exit1
:exit1
if errorlevel 4 exit.
if errorlevel 2 exit.
if errorlevel 1 exit.
rem Удаляем сетевой диск.
echo.>>%OUTPUT%
echo %TIME% Unmounting network disk with files >>%OUTPUT%
echo %TIME% Unmounting network disk with files
net use y: /delete /Y
if errorlevel 0 (
echo %TIME% Unmounting network disk with files Success! >>%OUTPUT%
echo %TIME% Unmounting network disk with files Success!
) else (
echo %TIME% Unmounting network disk with files Failed! >>%OUTPUT%
echo %TIME% Unmounting network disk with files Failed!
)
echo.>>%OUTPUT%
rem Создаем образы для записи
title Creating iso
echo %TIME% Creating Image files...
echo %TIME% Creating Image files...>>%OUTPUT%
cdimage.exe -lnew -n -w4 %folderclear1% %isodisk1% >>%OUTPUT%
cdimage.exe -lnew -n -w4 %folderclear1% %isodisk2% >>%OUTPUT%
echo Files Created Success!...
rem запысываем диски
echo %TIME% Recording Disks1...>>%OUTPUT%
echo %TIME% Recording Disks1...
cdburn d: %isodisk1%
echo %TIME% Recording Disks2...>>%OUTPUT%
echo %TIME% Recording Disks2...
cdburn f: %isodisk2%
rem Тут начинается работа уже с записанными дисками по сбору самой базы.
rem Можно вынести эту часть скрипта в отдельный скрипт и запускать отдельно.
rem монтируем трукриптом.
echo %TIME% Mounting Virtual discs...
echo %TIME% Mounting Virtual discs...>>%OUTPUT%
title Mounting Virtual discs...
c:\truecrypt\truecrypt.exe /v d:\text1.txt /lu /q /k %passfile1%
echo Disk - U: mounted...
c:\truecrypt\truecrypt.exe /v f:\text2.txt /lv /q /k %passfile1%
echo Disk - V: mounted...
c:\truecrypt\truecrypt.exe /v %text3txt% /ls /q /k %passtext3%
echo Disk - S: mounted...
rem c:\truecrypt\truecrypt.exe /v g:\text3.txt /ls /q /k c:\tmp\passtext3.txt
rem Монтируем базу.
title Working with Database...
color 0C
Echo %TIME% Starting DBO Script....
Echo %TIME% Starting DBO Script....>>%OUTPUT%
echo. >>%OUTPUT%
start /wait mountdb.cmd
Echo %TIME% Starting Access....
Echo %TIME% Starting Access....>>%OUTPUT%
echo. >>%OUTPUT%
start /wait "c:\Program Files\Microsoft Office\Office12\"MSACCESS.EXE c:\TrueCrypt\scripts\FactoringSec.mdb
Echo %TIME% Start Deleting DBO....
Echo %TIME% Start Deleting DBO....>>%OUTPUT%
echo. >>%OUTPUT%
title Deleting DBO
start /wait dropdb.cmd
Echo %TIME%Dismounting Virtual Discs...>>%OUTPUT%
echo. >>%OUTPUT%
Echo %TIME% Dismounting Virtual Discs...
c:\truecrypt\truecrypt.exe /du /q
c:\truecrypt\truecrypt.exe /dv /q
c:\truecrypt\truecrypt.exe /ds /q
echo %TIME% Stopping SQLEXPRESS >>%OUTPUT%
echo. >>%OUTPUT%
echo %TIME% Stopping SQLEXPRESS
rem Тормозим службу SQLEXPRESS
echo. >>%OUTPUT%
echo %TIME% >>%OUTPUT%
echo %TIME% Stoping SQLEXPRESS Service! >>%OUTPUT%
net stop "SQL Server (SQLEXPRESS)"
if errorlevel 0 (
echo %TIME% SQLEXPRESS Stop Success! >>%OUTPUT%
echo %TIME% SQLEXPRESS Stop Success!
echo. >>%OUTPUT%
) else (
echo %TIME% SQLEXPRESS Service Stop failed! >>%OUTPUT%
echo %TIME% SQLEXPRESS Service Stop failed!
echo. >>%OUTPUT%
pause.
)