I just started scripting in autoit, and this is my first script so please don't laugh. ![;)]()
Anyway, what I'm trying to do is to mount/unmount a network drive with autoit, I have gotten it to run, but I dont want to have those batch files with me (I only want the exe file).
This is the script i have so far, but i want the batch files to be included inside the exe.
If anybody know's what I'm doing wrong please tell me! Thanks!
![;)](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/wink.png)
Anyway, what I'm trying to do is to mount/unmount a network drive with autoit, I have gotten it to run, but I dont want to have those batch files with me (I only want the exe file).
This is the script i have so far, but i want the batch files to be included inside the exe.
[ autoit ]
#include Opt('MustDeclareVars', 1) MainGUI() Func MainGUI() Local $Window1, $Window2, $Button1, $Button2, $Button3, $msg $Window1 = GUICreate("Report Server Mount", 240, 70) Opt("GUICoordMode", 2) $Button1 = GUICtrlCreateButton("Mount", 10, 10, 100, 50) $Button2 = GUICtrlCreateButton("Unmount", 20, -1) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 Run('mount.cmd') GUIDelete($Window1) $Window2 = GUICreate("Mounted", 240, 70) Opt("GUICoordMode", 2) $Button3 = GUICtrlCreateButton("Mounted", 10, 10, 220, 50) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE If $msg = $GUI_EVENT_CLOSE Then Exit ExitLoop Case $msg = $Button3 Exit EndSelect WEnd Case $msg = $Button2 Run('unmount.cmd') GUIDelete($Window1) $Window2 = GUICreate("Unmounted", 240, 70) Opt("GUICoordMode", 2) $Button3 = GUICtrlCreateButton("Unmounted", 10, 10, 220, 50) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE If $msg = $GUI_EVENT_CLOSE Then Exit ExitLoop Case $msg = $Button3 Exit EndSelect WEnd EndSelect WEnd EndFunc
If anybody know's what I'm doing wrong please tell me! Thanks!