Hallo,
es sind meine ersten Gehversuche mit AutoIT und schon komme ich ins stolpern...
Ich möchte die Installation von "DameWare Mini Remote Controle" automatisieren
Das Setup muss als Admin gestartet werden, ansonsten muss das Passwort beim Klick auf "Install" eingegeben werden.
Typisch Win7 halt...
Ich habe das Beispiel von RunAs aus der Hilfe versucht mit dem Notepad.
Funktioniert prima, bin dann im Kontext des Admins mit Notepad
Code
Example()
Func Example()
; Change the username and password to the appropriate values for your system.
Local $sUserName = "Administrator"
Local $sPassword = "Password"
; Run Notepad with the window maximized. Notepad is run under the user previously specified.
Local $iPID = RunAs($sUserName, "MyDOM", $sPassword, 0, "notepad.exe", "", @SW_SHOWMAXIMIZED)
; Wait 10 seconds for the Notepad window to appear.
;WinWait("[CLASS:Notepad]", "", 10)
; Close the Notepad process using the PID returned by RunAs.
;ProcessClose($iPID)
EndFunc ;==>Example
Alles anzeigen
Wenn ich da den nur den Pfad anpasse tut sich schon nichts mehr!
Code
Local $iPID = RunAs($sUserName, "MyDOM", $sPassword, 0, "C:\Temp\Dameware\DameWare-MRC64-v10.0.0.exe", "", @SW_SHOWMAXIMIZED)
auch so nicht
Code
Local $iPID = RunAs($sUserName, "MyDOM", $sPassword, 0, "DameWare-MRC64-v10.0.0.exe", "C:\Temp\Dameware", @SW_SHOWMAXIMIZED)
versuche ich es mit Putty geht es aber Putty braucht auch kein Admin... Aber von den Pfaden her zeigt das ja das es soweit alles richtig sein sollte.
Code
Local $iPID = RunAs($sUserName, "MyDOM", $sPassword, 0, "C:\Temp\Dameware\putty062.exe", "", @SW_SHOWMAXIMIZED)
Was mache ich flasch?
Ich hoffe ihr könnt mir helfen.
Mfg
Jabberwock