Hallo,
ich bin aktuell ein wenig ratlos. Ich habe ein Skript geschrieben, welches die Installation einer Software automatisiert. Hier mal ein kurzer Auszug aus dem Code:
If FileExists($setup) Then
BlockInput(1)
RunAsSet("domänenadmin", "domäne", "passwort")
Run($setup)
Sleep(5000)
While ProcessExists("msiexec.exe")
If WinActive("Fenstertitel", "Fenstertext") Then
Send("!w")
EndIf
usw.
Das Problem ist nun, dass bei 80% der Rechner, auf dem ich das Skript habe laufen lassen, alles perfekt funktioniert - bei 20% allerdings bleibt das Skript nach dem Öffnen der Setup-Datei (also beim ersten Dialog der Installationsroutine) stehen. Das "BlockInput" ist nicht aktiv, so dass der Benutzer eingreifen kann, was er eigentlich nicht dürfte. Meine Frage ist nun, ob es unter gewissen Umständen allgemein Probleme mit dem "send"-Befehl bzw. dem senden bestimmter Tastenkombinationen gibt ? Ich kann diesen Fehler nämlich nicht nachvollziehen und auch nicht provozieren. Denn wenn ich das Skript auf den "Problem-Rechnern" manuell nochmal anstoße, dann läuft es einwandfrei durch.