
![]() |
Наши проекты:
Журнал · Discuz!ML · Wiki · DRKB · Помощь проекту |
|
ПРАВИЛА | FAQ | Помощь | Поиск | Участники | Календарь | Избранное | RSS |
[216.73.217.4] |
![]() |
|
Страницы: (2) 1 [2] все ( Перейти к последнему сообщению ) |
Сообщ.
#16
,
|
|
|
Что б тему не создавать другую решил сдесь отписать, нашел скрипт на удаленный запуск скрипта:
![]() ![]() strComputer ="192.168.0.13" strCommand = "wscript.exe c:\printer.vbs" Set locator = CreateObject("wbemscripting.swbemlocator") set objwmiservice = locator.connectserver(strComputer,"\root\cimv2","apt3","") Set objScheduledJob = objWMIService.Get("Win32_ScheduledJob") tyear = mid(now(),7,4) for i = 1 to 31 datex = i & ".03." & tyear & " 01:00:00" datey = i & ".10." & tyear & " 01:00:00" if weekday (datex,2)="7" then martdate=datex if weekday (datey,2)="7" then octoberdate=datey next CurrTimePlusOneMin = Replace(Left(Right(dateadd ("n",1,Now()), 8), 5), ":", "") if now() > martdate and now() < octoberdate then RunTime = "********" & CurrTimePlusOneMin & "00.000000+240" else RunTime = "********" & CurrTimePlusOneMin & "00.000000+180" end if Res = objScheduledJob.Create(strCommand, RunTime, False, 2^(Weekday(Now(), 2)-1), 0, True, intJobID) ругается на 4,1 строку SWbemlocator: Сервер RPC недоступен. Служба RPC запущена, как на моей так и на той машине где нужно запустить скрипт. МБ нужно эту службу запустить на серваке? порты 135 и 593 расшарил по локалке в фаерворде |