Hallo zusammen,
wie ist es möglich an eine .exe einen oder mehrere variable Startparameter zu übergeben?
Ich möchte gerne die Usereingabe als Variable speichern (das funktioniert) und dann als Startparameter mit übergeben.
So funktioniert es leider nicht.
Ganzer Code:
C
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\8216445\Desktop\AutoIt Witron Autostart Projekt\GUI.kxf
$Form1_1 = GUICreate("Autostart", 333, 203, -1, -1)
GUISetFont(8, 400, 0, "Consolas")
GUISetBkColor(0xFFFFFF)
;Eingabefelder
$Input1 = GUICtrlCreateInput("", 88, 8, 225, 21)
$input2 = GUICtrlCreateInput("", 88, 32, 225, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
$Start = GUICtrlCreateButton("Start", 88, 56, 225, 41)
GUICtrlSetBkColor(-1, 0xE3E3E3)
$Button1 = GUICtrlCreateButton("Beenden", 88, 128, 225, 25)
GUICtrlSetBkColor(-1, 0xE3E3E3)
$Label1 = GUICtrlCreateLabel("Passwort", 8, 32, 52, 17)
$Benutzername = GUICtrlCreateLabel("Benutzername", 8, 8, 76, 17)
$Button2 = GUICtrlCreateButton("Info", 256, 176, 57, 17)
GUICtrlSetBkColor(-1, 0xE3E3E3)
$Button3 = GUICtrlCreateButton("Alle Programme beenden", 88, 104, 225, 17)
GUICtrlSetBkColor(-1, 0xE3E3E3)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Exit 0
Case $Button2
Case $Button3
Case $start
$usr = GUICtrlRead($Input1)
$pwd = GUICtrlRead($Input2)
run("wvs.exe -$usr -$pwd")
EndSwitch
WEnd
Alles anzeigen