Hi,
folgende Problematik, ich würde gerne auf einem Remote PC incl. Authentifizierung die deaktivierten DIenste auslesen. Leider scheint die Connection mit meinem String nicht zu funktionieren:
Jemand eine Idee?
[autoit]
#include <String.au3>
#include <Array.au3>
$AUTHPASS = "pw"
$AUTHLOGIN = "domain\acc"
$sSC_hostname="FQDN"
$sSC_output=@TempDir&'\SCoutput.txt'
FileDelete($sSC_output)
RunWait(@ComSpec&' /c sc.exe \\'&$sSC_hostname& '-u ' & $AUTHLOGIN & _
' -pw ' & $AUTHPASS &' query state= inactive > "'&$sSC_Output&'"','',@SW_SHOW)
$sSC_content=FileRead($sSC_Output)
$aStoppedServicesList=_StringBetween($sSC_content,'DISPLAY_NAME: ',@CRLF)
_ArrayDisplay($aStoppedServicesList)
Hab mich am Beispiel von Comspec orientiert:..
[autoit]$E = RunWait(@ComSpec & ' /c ""' & @TempDir & '\~blattmp.exe" "' & $TEXT & _
'" -to ' & $DEST & ' -binary -server ' & $SMTPSERVER & ' -log ' & @TempDir & _
'\~maillog.txt -timestamp -f ' & $SENDER & $SUBJECT & '-u ' & $AUTHLOGIN & _
' -pw ' & $AUTHPASS & '"', @TempDir, @SW_HIDE)
Edit Raupi: Geschlossen auf Wunsch von Threadersteller