ja natürlich, problem scheint das selbst der domain admin nicht die benötigten rechte hat um auf das ereignis log zuzugreifen ![]()
Beiträge von richie1985
-
-
so:
AutoIt
Alles anzeigen#include <Array.au3> ;#RequireAdmin Local $sUsername = "IT" Local $sPassword = "xxxxxxx" Local $sDomain = "lokal" Local $foo1 = RunAs($sUserName, $sDomain, $sPassword, 0, @ComSpec & ' /c wevtutil qe Microsoft-Windows-Diagnostics-Performance/Operational /q:*[System[(EventID=100)]] /rd:true /c:1', "", @SW_SHOWDEFAULT) ;$foo1=Run(@ComSpec & ' /c wevtutil qe Microsoft-Windows-Diagnostics-Performance/Operational /q:*[System[(EventID=100)]] /rd:true /c:1', @SystemDir, @SW_HIDE,$STDERR_CHILD + $STDOUT_CHILD) _ReadCMDOut($foo1) Func _ReadCMDOut($CMD) Local $line While 1 $line = StdoutRead($CMD) ConsoleWrite($line) If @error Then ExitLoop If $line <> "" Then $pBootTime = "<Data Name="&"'"&"BootTime"&"'"&">(.*?)</Data>" $pBootStartTime = "<Data Name="&"'"&"BootStartTime"&"'"&">(.*?)</Data>" $pBootEndTime = "<Data Name="&"'"&"BootEndTime"&"'"&">(.*?)</Data>" $pMainPathBootTime = "<Data Name="&"'"&"MainPathBootTime"&"'"&">(.*?)</Data>" $pBootPostBootTime = "<Data Name="&"'"&"BootPostBootTime"&"'"&">(.*?)</Data>" Local $aBootTime = StringRegExp($line, $pBootTime, $STR_REGEXPARRAYMATCH) Local $aBootStartTime = StringRegExp($line, $pBootStartTime, $STR_REGEXPARRAYMATCH) Local $aBootEndTime = StringRegExp($line, $pBootEndTime, $STR_REGEXPARRAYMATCH) Local $aMainPathBootTime = StringRegExp($line, $pMainPathBootTime, $STR_REGEXPARRAYMATCH) Local $aBootPostBootTime = StringRegExp($line, $pBootPostBootTime, $STR_REGEXPARRAYMATCH) _ArrayDisplay($aBootTime,"1") _ArrayDisplay($aBootStartTime,"2") _ArrayDisplay($aBootEndTime,"3") _ArrayDisplay($aMainPathBootTime,"4") _ArrayDisplay($aBootPostBootTime,"5") EndIf WEnd EndFunc -
Hallo,
mit diesem Script ist es möglich, die Dauer wie lange ein Rechner zum booten brauchte auszulesen. Es benötigt aber Admin Rechte. Leider bekomme ich es mit RunAS gar nicht zum laufen. Woran könnte es liegen?
AutoIt
Alles anzeigen#include <Array.au3> #RequireAdmin $foo1=Run(@ComSpec & ' /c wevtutil qe Microsoft-Windows-Diagnostics-Performance/Operational /q:*[System[(EventID=100)]] /rd:true /c:1', @SystemDir, @SW_HIDE,$STDERR_CHILD + $STDOUT_CHILD) _ReadCMDOut($foo1) Func _ReadCMDOut($CMD) Local $line While 1 $line = StdoutRead($CMD) ConsoleWrite($line) If @error Then ExitLoop If $line <> "" Then $pBootTime = "<Data Name="&"'"&"BootTime"&"'"&">(.*?)</Data>" $pBootStartTime = "<Data Name="&"'"&"BootStartTime"&"'"&">(.*?)</Data>" $pBootEndTime = "<Data Name="&"'"&"BootEndTime"&"'"&">(.*?)</Data>" $pMainPathBootTime = "<Data Name="&"'"&"MainPathBootTime"&"'"&">(.*?)</Data>" $pBootPostBootTime = "<Data Name="&"'"&"BootPostBootTime"&"'"&">(.*?)</Data>" Local $aBootTime = StringRegExp($line, $pBootTime, $STR_REGEXPARRAYMATCH) Local $aBootStartTime = StringRegExp($line, $pBootStartTime, $STR_REGEXPARRAYMATCH) Local $aBootEndTime = StringRegExp($line, $pBootEndTime, $STR_REGEXPARRAYMATCH) Local $aMainPathBootTime = StringRegExp($line, $pMainPathBootTime, $STR_REGEXPARRAYMATCH) Local $aBootPostBootTime = StringRegExp($line, $pBootPostBootTime, $STR_REGEXPARRAYMATCH) _ArrayDisplay($aBootTime,"1") _ArrayDisplay($aBootStartTime,"2") _ArrayDisplay($aBootEndTime,"3") _ArrayDisplay($aMainPathBootTime,"4") _ArrayDisplay($aBootPostBootTime,"5") EndIf WEnd EndFunc -
hi,
wie schaut es aus mit parameter wie diese:
gatewayusagemethod:i:2
gatewayprofileusagemethod:i:1
gatewaycredentialssource:i:0
full address:s:UG-VSRV03.TEST.INT
gatewayhostname:s:UG-VSRV03.test.int
workspace id:s:UG-VSRV03.test.int
use redirection server name:i:1
loadbalanceinfo:s:tsv://MS Terminal Services Plugin.1.Terminal-Serverwie kann ich diese ebenfalls angeben?
Gruss
-
ja die habe ich auch verwendet, ändert aber nix an dem problem.
-
Halllo,
sorry deine Antwort versteh ich nicht. Micha_He hat doch nur geschrieben, das man die audio.au3 ins include verzeichnis legen soll, was ich natürlich gemacht hab, hab ich ja auch in meinem post beschrieben. bei mir tut sich trotzdem nix.
-
mit der hier in dem thread angehangen exe (weiter oben) geht es, warum funktioniert denn da mein script nicht?
-
Hallo, bin niegelnagel neu hier und genau dieser Thread beschreibt mein Problem, ich möchte die Mic Lautstärke ändern.
Doch leider tut sich bei mir nix:
[autoit]#include <audio.au3>
[/autoit]
_SoundSetMicrophoneVolume(10)Das ist mein Skript und ja natürlich hab ich die audio.au3 in das Include Verzeichnis gelegt.
Debuger Ausgabe:
>"C:\Programme\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Programme\AutoIt3\Examples\Mic10.au3"
>Exit code: 0 Time: 0.218Also keinerlei Fehlermeldung, keine Reaktion, nichts.
Könnt ihr mir helfen?