Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Новый участник


Сообщения: 5
Благодарности: 0

Профиль | Отправить PM | Цитировать


Iska, windows 7

вот сам нарыл только это, может поможет в решений данной проблемы, но немного не то:
Код: Выделить весь код
Restart Program Script:

set Service = GetObject ("winmgmts:")
set Shell = WScript.CreateObject("WScript.Shell")

'Name of the exe we want to watch
sEXEName = "processing.exe"
'Path of the folder it is in (Don't forget the trailing \)
sApplicationPath = "C:\process\"

'Loop until the system is shutdown or user logs out
while true 
 bRunning = false

 'Look for our application. Set the flag bRunning = true
 'If we see that it is running 

 for each Process in Service.InstancesOf ("Win32_Process")
  if Process.Name = sEXEName then
   bRunning=true
  End If
 next

'Is our app running?

if (not bRunning) then
 'No it is not, launch it
 Shell.Run Chr(34) & sApplicationPath & sEXEName & Chr(34)
end if

'Sleep a while so we do not hog the cpu
WScript.Sleep(2000)

wend
только следит чтоб программа не закрывалась и постоянно висит в процессах

Отправлено: 12:25, 17-09-2014 | #3