Имя пользователя:
Пароль:
 

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

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


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

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


Iska, вставил в код название программы vlc.exe
Код: Выделить весь код
powershell /nologo /noprofile "[int]((get-date) - ((get-process 'vlc.exe').starttime)).totalminutes"
powershell пишит ошибку
Код: Выделить весь код
Get-Process : Cannot find a process with the name "vlc.exe". Verify the process name and call the cmdlet again.
At line:1 char:33
+ [int]((get-date) - ((get-process <<<<  'vlc.exe').starttime)).totalminutes
    + CategoryInfo          : ObjectNotFound: (vlc.exe:String) [Get-Process], ProcessCommandException
    + FullyQualifiedErrorId : NoProcessFoundForGivenName,Microsoft.PowerShell.Commands.GetProcessCommand

Cannot find an overload for "op_Subtraction" and the argument count: "2".
At line:1 char:19
+ [int]((get-date) - <<<<  ((get-process 'vlc.exe').starttime)).totalminutes
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
VBS код конечно интересный, но хотелось бы на дни:часы:минуты и в BAT/CMD. Это вообще возможно?

Отправлено: 12:44, 25-02-2017 | #13