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

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

Аватара для Mike909

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


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

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


Код: Выделить весь код
#include<array.au3>

_ArrayDisplay(_GetCert())  

Func _GetCert()

    $psLine = "$MyCerts = dir Cert:\LocalMachine\My; Foreach($MyCert in $MyCerts) {   $MyCert.SerialNumber;  $MyCert.PrivateKey.CspKeyContainerInfo.UniqueKeyContainerName; }"

   $iPID = Run(@ComSpec & " /c Powershell " & $psLine, "", @SW_HIDE , $stdout_child)

   $sOutput = ""

          While 1
                 $sOutput &= StdoutRead($iPID)
                 If @error Then
                     ExitLoop
                 EndIf
          WEnd

   $aRtn = stringsplit($sOutput , @LF , 2)
   _ArrayDelete($aRtn , ubound($aRtn) - 1)
   If ubound($aRtn) < 1 then _ArrayAdd($aRtn , "No Match Found")
   Return $aRtn

EndFunc

Отправлено: 16:44, 19-12-2016 | #2