zhuk09
06-10-2014, 13:21
Всем добрый день!
Существует скрипт, который запускает 1С, запускается от локального пользователя (пробовал и от доменного). Но иногда пользователи не корректно завершает работу с 1С, и его сессия блокирует запуск скрипта (1C в монопольном режиме). Для этого прописал перед запуском скрипта Logoff
query session >session.txt
for /f "skip=1 tokens=3," %%i in (session.txt) DO logoff %%i
del session.txt
"C:\Program Files\1Cv77\BIN\1cv7.exe" enterprise /m /DP:\2013 /Nadmin /P2584868
но после этого в шедулере появляется ошибка 0xC000013A.
На это MS заявляет что http://support.microsoft.com/kb/308558If the result code has the "C0000XXX" format, the task did not complete successfully (the "C" indicates an error condition). The most common "C" error code is "0xC000013A: The application terminated as a result of a CTRL+C".
Это не мой случай, иду дальше....
http://support.microsoft.com/kb/887572
When the Task Scheduler service runs a job by using a specific account, the Task Scheduler service tries to determine whether this account is also the account of the current logged-on user. If the account is that of the current logged-on user, the security context of the scheduled task is mapped to the security context of that user. This process directs scheduled jobs to that user's desktop.
Все эти пользователи имеют права безопасности - "Вход в качестве пакетного задания"
т.е как я понимаю ни от локального, ни от доменного пользователя запустить процесс не получится???
Посоветуйте как лучше сделать??!
Существует скрипт, который запускает 1С, запускается от локального пользователя (пробовал и от доменного). Но иногда пользователи не корректно завершает работу с 1С, и его сессия блокирует запуск скрипта (1C в монопольном режиме). Для этого прописал перед запуском скрипта Logoff
query session >session.txt
for /f "skip=1 tokens=3," %%i in (session.txt) DO logoff %%i
del session.txt
"C:\Program Files\1Cv77\BIN\1cv7.exe" enterprise /m /DP:\2013 /Nadmin /P2584868
но после этого в шедулере появляется ошибка 0xC000013A.
На это MS заявляет что http://support.microsoft.com/kb/308558If the result code has the "C0000XXX" format, the task did not complete successfully (the "C" indicates an error condition). The most common "C" error code is "0xC000013A: The application terminated as a result of a CTRL+C".
Это не мой случай, иду дальше....
http://support.microsoft.com/kb/887572
When the Task Scheduler service runs a job by using a specific account, the Task Scheduler service tries to determine whether this account is also the account of the current logged-on user. If the account is that of the current logged-on user, the security context of the scheduled task is mapped to the security context of that user. This process directs scheduled jobs to that user's desktop.
Все эти пользователи имеют права безопасности - "Вход в качестве пакетного задания"
т.е как я понимаю ни от локального, ни от доменного пользователя запустить процесс не получится???
Посоветуйте как лучше сделать??!