Jump to content

Need Help On GUI


Recommended Posts

I create a gui..Every thing is work perfectly, but How i add on going process text in in GUIProgress Bar

Following in my gui code...

#include <GuiConstants.au3>
GuiSetIcon('ServicesPE.ICO', 0)
; ================================================================================
;All Massages Variables
; ================================================================================
$abouthelp = "Author : JusThinK" & @CRLF & "A Very Big Thanks Goes to d4vr0s" & @CRLF & "Also Thanks to foggw & Darc" & @CRLF & "" & @CRLF & "**Main GUI or Installing Services option only available in BartPE Environment**" & @CRLF & "" & @CRLF & "Internet Service Manager Help You to Start All Nesseary Services for" & @CRLF & "Dial-Up,PPPoE and WireLess Network Connections.." & @CRLF & "" & @CRLF & "Internetj.exe also support Command Line Parameter" & @CRLF & "" & @CRLF & "/b Command Line Install Services Automatically with BartPe.exe" & @CRLF & "" & @CRLF & "/n Command Line Install Services Automatically with NetCfg.exe" & @CRLF & "" & @CRLF & "/h or /? Opens This Help Window" & @CRLF & "" & @CRLF & "Example :" & @CRLF & "'internetj.exe /b' or 'internetj.exe /n'" & @CRLF & "" & @CRLF & "Support Forum :" & @CRLF & "http://www.911cd.net/forums/index.php?showtopic=15763" & @CRLF & "" & @CRLF & "My Web : http://www.justthink.tk"
$title1='Internet Service Manager v0.8 By JusThinK'
$title2='Internet Service Manager v0.8'
$traytip='It helps you to start Internet Services For BartPE...'
$limitation = "This GUI only run under BartPE Environment"
$beforins = "Network Services are not installed!!" & @CRLF & "Start Network Services First By Using 'MSCLIENT.CMD'or'PENeTCfg.exe'" & @CRLF & "Click 'OK' to Run 'PeNetCFG.exe'(If Exist) else 'MSCLIENT.CMD'" & @CRLF & "And run this again after instalation."
$already = "Services are Already Installed.."
$clineb='Start ISM with /b Command Line..'
$clinen='Start ISM with /n Command Line..'
$successb = "Instalation Complete Successfully with BartPE.exe..."
$successn = "Instalation Complete Successfully with NetCFG.exe..."
$fatal = "Unable to find 'PeNetCFG.EXE' or 'MSCLIENT.CMD'"
; ================================================================================
AutoItWinSetTitle ( $title1 )
Opt("TrayMenuMode",1); Default tray menu items (Script Paused/Exit) will not be shown.
TraySetToolTip ('$title1')
TrayTip($title1, $traytip, 2, 1)
; ================================================================================
; Check for command line parameters
; ================================================================================
$Parameter = "none"
For $i = 1 To $CmdLine[0]
    Select
        Case $CmdLine[$i] = "/b"; Use bartpe.exe to start networking
        ; ================================================================================
        ;BartPE Environment Check
        ; ================================================================================
                $var = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\PE Builder", "Product")
                if $var="" then
                    msgbox(16,"BartPE Limitation",$limitation)
                    exit
                endif
        ; ================================================================================
        ;Checking If Network Client Components Are Installed...
        ; ================================================================================
                $init0 = RunWait("bartpe.exe -c c -q ms_msclient","",@SW_HIDE)
                if $init0<>0 then
                    MsgBox(48,$title1,$beforins)
                        if(FileExists(@SystemDir & "\penetcfg.exe")) then
                            Run(@SystemDir & "\penetcfg.exe")
                        Else
                            If(FileExists(@SystemDir & "\msclient.cmd")) Then
                                Run("cmd.exe /k msclient.cmd")
                            Else
                                MsgBox(48,"-=ERROR=-",$fatal)
                            EndIf
                        endif
                    exit
                endif
        ; ================================================================================
        ;Checking If service already installed...
        ; ================================================================================
                $init1 = RunWait("bartpe.exe -c c -q ms_rassrv","",@SW_HIDE)
                if $init1=0 then
                    MsgBox(64,$title1,$already)
                    exit
                endif
                _Start_BartPECMD()
                Exit
        Case $CmdLine[$i] = "/n"; Use netcfg.exe to start networking
           ;================================================================================
        ;BartPE Environment Check
        ; ================================================================================
                $var = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\PE Builder", "Product")
                if $var="" then
                    msgbox(16,"BartPE Limitation",$limitation)
                    exit
                endif
        ; ================================================================================
        ;Checking If Network Client Components Are Installed...
        ; ================================================================================
                $init0 = RunWait("bartpe.exe -c c -q ms_msclient","",@SW_HIDE)
                if $init0<>0 then
                    MsgBox(48,$title1,$beforins)
                        if(FileExists(@SystemDir & "\penetcfg.exe")) then
                            Run(@SystemDir & "\penetcfg.exe")
                        Else
                            If(FileExists(@SystemDir & "\msclient.cmd")) Then
                                Run("cmd.exe /k msclient.cmd")
                            Else
                                MsgBox(48,"-=ERROR=-",$fatal)
                            EndIf
                        endif
                    exit
                endif
        ; ================================================================================
        ;Checking If service already installed...
        ; ================================================================================
                $init1 = RunWait("bartpe.exe -c c -q ms_rassrv","",@SW_HIDE)
                if $init1=0 then
                    MsgBox(64,$title1,$already)
                    exit
                endif
                _Start_NetcfgCMD()
                Exit
        Case $CmdLine[$i] = "/h"; Internetj.exe Help Support
            Msgbox(0,$title2,$abouthelp)
            Exit
        Case $CmdLine[$i] = "/?"; Internetj.exe Help Support
            Msgbox(0,$title2,$abouthelp)
            Exit
    EndSelect
Next
; ================================================================================
;BartPE Environment Check
; ================================================================================
$var = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\PE Builder", "Product")
if $var="" then
msgbox(16,"BartPE Limitation",$limitation)
exit
endif
; ================================================================================
;Checking If Network Client Components Are Installed...
; ================================================================================
$init0 = RunWait("bartpe.exe -c c -q ms_msclient","",@SW_HIDE)
if $init0<>0 then
    MsgBox(48,$title1,$beforins)
      if(FileExists(@SystemDir & "\penetcfg.exe")) then
          Run(@SystemDir & "\penetcfg.exe")
      Else
          If(FileExists(@SystemDir & "\msclient.cmd")) Then
              Run("cmd.exe /k msclient.cmd")
          Else
              MsgBox(48,"-=ERROR=-",$fatal)
          EndIf
      endif
    exit
endif
; ================================================================================
;Checking If service already installed...
; ================================================================================
$init1 = RunWait("bartpe.exe -c c -q ms_rassrv","",@SW_HIDE)
if $init1=0 then
    MsgBox(64,$title1,$already)
    exit
endif
; ================================================================================
; Build the GUI
; ================================================================================
GUICreate("Internet Service Manager v0.08", 276, 190, -1, -1, BitOR($WS_EX_MDICHILD, $WS_EX_APPWINDOW, $WS_EX_LEFTSCROLLBAR, $WS_EX_OVERLAPPEDWINDOW, $WS_EX_CLIENTEDGE))
$Group_1 = GuiCtrlCreateGroup("ISM-Menu", 10, 1, 256, 68)
GUICtrlSetColor(-1,0xAE333D)
$Radio_1 = GUICtrlCreateRadio("Start Internet Service With &Netcfg.exe", 35, 15, 200, 20)
GUICtrlSetColor(-1,0x0116d1)
$Radio_2 = GUICtrlCreateRadio("Start Internet Service With &Bartpe.exe", 35 , 40, 200, 20)
GUICtrlSetColor(-1,0x0116d1)
$Button_3 = GUICtrlCreateButton("&START", 70, 75, 135, 20, BitOR($BS_FLAT, $WS_BORDER, $WS_EX_STATICEDGE))
$Progress_4 = GUICtrlCreateProgress(18, 115, 240, 20)
GUICtrlSetColor(-1,12396489)
$Group_2 = GuiCtrlCreateGroup("Instalation Progress", 10, 98, 256, 48)
GUICtrlSetColor(-1,0xff0000)
GUICtrlSetState($Radio_1, $GUI_CHECKED)
$ism = GUICtrlCreateMenu ("&ISM")
$exit = GUICtrlCreateMenuitem ("E&xit",$ism)
$helpmenu = GUICtrlCreateMenu ("?")
$infoitem = GUICtrlCreateMenuitem ("&Help",$helpmenu)
GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $Button_3
            Select
                Case GUICtrlRead($Radio_1) = $GUI_CHECKED
                    _Start_Netcfg()
                    ExitLoop
                Case GUICtrlRead($Radio_2) = $GUI_CHECKED
                    _Start_BartPE()
                    ExitLoop
            EndSelect
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
    If $msg = $infoitem Then Msgbox(0,$title2,$abouthelp)
    If $msg = $exit Then ExitLoop
    Sleep(10);keep Processor Utilization down
WEnd
; ================================================================================
; Function _Start_BartPE()
; ================================================================================
Func _Start_BartPE()
    AutoItWinSetTitle ( $title1 )
    GUICtrlSetData($Progress_4,7)
    $step01=RunWait("bartpe.exe -v -c s -i ms_server","",@SW_HIDE)
    if $step01<>0 then
        msgbox(16,$title1,"Unable to install ms_server")
    exit
endif
    GUICtrlSetData($Progress_4,14)
    $step02=RunWait("bartpe.exe -v -c p -i ms_l2tp","",@SW_HIDE)
    if $step02<>0 then
        msgbox(16,$title1,"Unable to install ms_l2tp")
    exit
endif
    GUICtrlSetData($Progress_4,21)
    $step03=RunWait("bartpe.exe -v -c p -i ms_pptp","",@SW_HIDE)
    if $step03<>0 then
        msgbox(16,$title1,"Unable to install ms_pptp")
    exit
endif
    GUICtrlSetData($Progress_4,28)
    $step04=RunWait("bartpe.exe -v -c p -i ms_pppoe","",@SW_HIDE)
    if $step04<>0 then
        msgbox(16,$title1,"Unable to install ms_pppoe")
    exit
endif
    GUICtrlSetData($Progress_4,35)
    $step05=RunWait("bartpe.exe -v -c p -i ms_wanarp","",@SW_HIDE)
    if $step05<>0 then
        msgbox(16,$title1,"Unable to install ms_wanarp")
    exit
endif
    GUICtrlSetData($Progress_4,42)
    $step06=RunWait("bartpe.exe -v -c p -i ms_ndiswan","",@SW_HIDE)
;Problem with ExitCode
;if $step06<>0 then
    ;msgbox(16,$title1,"Unable to install MS Server")
;exit
;endif
    GUICtrlSetData($Progress_4,49)
    $step07=RunWait("bartpe.exe -v -c p -i ms_ndisuio","",@SW_HIDE)
    if $step07<>0 then
        msgbox(16,$title1,"Unable to install ms_ndisuio")
    exit
endif
    GUICtrlSetData($Progress_4,56)
    $step08=RunWait("bartpe.exe -v -c s -i ms_wzcsvc","",@SW_HIDE)
    if $step08<>0 then
        msgbox(16,$title1,"Unable to install ms_wzcsvc")
    exit
endif
    GUICtrlSetData($Progress_4,63)
    $step09=RunWait("net start wzcsvc","",@SW_HIDE)
    if $step09<>0 then
        msgbox(16,$title1,"Unable to start wzcsvc")
    exit
endif
    GUICtrlSetData($Progress_4,70)
    $step10=RunWait("net start tapisrv","",@SW_HIDE)
    if $step10<>0 then
        msgbox(16,$title1,"Unable to start tapisrv")
    exit
endif
    GUICtrlSetData($Progress_4,77)
    $step11=RunWait("bartpe.exe -v -c s -i ms_rasman","",@SW_HIDE)
    if $step11<>0 then
        msgbox(16,$title1,"Unable to install ms_rasman")
    exit
endif
    GUICtrlSetData($Progress_4,84)
    $step12=RunWait("bartpe.exe -v -c s -i ms_rassrv","",@SW_HIDE)
    if $step12<>0 then
        msgbox(16,$title1,"Unable to install ms_rassrv")
    exit
endif
    GUICtrlSetData($Progress_4,91)
    $step13=RunWait("bartpe.exe -v -c s -i ms_rascli","",@SW_HIDE)
;if $step13<>0 then
    ;msgbox(16,$title1,"Unable to install ms_rascli")
;exit
;endif
    GUICtrlSetData($Progress_4,100)
    $step14=RunWait("net start rasman","",@SW_HIDE)
    if $step14<>0 then
        msgbox(16,$title1,"Unable to start rasman")
    exit
endif
MsgBox(64,$title1,$successb)
    Return
EndFunc ; ==> _Start_BartPE()
; ================================================================================
; Function _Start_Netcfg()
; ================================================================================
Func _Start_Netcfg()
    AutoItWinSetTitle ( "Internet Service Manager By JusThinK" )
    GUICtrlSetData($Progress_4,7)
    $step01=RunWait("netcfg.exe -v -c s -i ms_server","",@SW_HIDE)
    if $step01<>0 then
        msgbox(16,$title1,"Unable to install ms_server")
    exit
endif
    GUICtrlSetData($Progress_4,14)
    $step02=RunWait("netcfg.exe -v -c p -i ms_l2tp","",@SW_HIDE)
    if $step02<>0 then
        msgbox(16,$title1,"Unable to install ms_l2tp")
    exit
endif
    GUICtrlSetData($Progress_4,21)
    $step03=RunWait("netcfg.exe -v -c p -i ms_pptp","",@SW_HIDE)
    if $step03<>0 then
        msgbox(16,$title1,"Unable to install ms_pptp")
    exit
endif
    GUICtrlSetData($Progress_4,28)
    $step04=RunWait("netcfg.exe -v -c p -i ms_pppoe","",@SW_HIDE)
    if $step04<>0 then
        msgbox(16,$title1,"Unable to install ms_pppoe")
    exit
endif
    GUICtrlSetData($Progress_4,35)
    $step05=RunWait("netcfg.exe -v -c p -i ms_wanarp","",@SW_HIDE)
    if $step05<>0 then
        msgbox(16,$title1,"Unable to install ms_wanarp")
    exit
endif
    GUICtrlSetData($Progress_4,42)
    $step06=RunWait("netcfg.exe -v -c p -i ms_ndiswan","",@SW_HIDE)
    if $step06<>0 then
        msgbox(16,$title1,"Unable to install MS Server")
    exit
endif
    GUICtrlSetData($Progress_4,49)
    $step07=RunWait("netcfg.exe -v -c p -i ms_ndisuio","",@SW_HIDE)
    if $step07<>0 then
        msgbox(16,$title1,"Unable to install ms_ndisuio")
    exit
endif
    GUICtrlSetData($Progress_4,56)
    $step08=RunWait("netcfg.exe -v -c s -i ms_wzcsvc","",@SW_HIDE)
    if $step08<>0 then
        msgbox(16,$title1,"Unable to install ms_wzcsvc")
    exit
endif
    GUICtrlSetData($Progress_4,63)
    $step09=RunWait("net start wzcsvc","",@SW_HIDE)
    if $step09<>0 then
        msgbox(16,$title1,"Unable to start wzcsvc")
    exit
endif
    GUICtrlSetData($Progress_4,70)
    $step10=RunWait("net start tapisrv","",@SW_HIDE)
    if $step10<>0 then
        msgbox(16,$title1,"Unable to start tapisrv")
    exit
endif
    GUICtrlSetData($Progress_4,77)
    $step11=RunWait("netcfg.exe -v -c s -i ms_rasman","",@SW_HIDE)
    if $step11<>0 then
        msgbox(16,$title1,"Unable to install ms_rasman")
    exit
endif
    GUICtrlSetData($Progress_4,84)
    $step12=RunWait("netcfg.exe -v -c s -i ms_rassrv","",@SW_HIDE)
    if $step12<>0 then
        msgbox(16,$title1,"Unable to install ms_rassrv")
    exit
endif
    GUICtrlSetData($Progress_4,91)
    $step13=RunWait("netcfg.exe -v -c s -i ms_rascli","",@SW_HIDE)
;if $step13<>0 then
    ;msgbox(16,$title1,"Unable to install ms_rascli")
;exit
;endif
    GUICtrlSetData($Progress_4,100)
    $step14=RunWait("net start rasman","",@SW_HIDE)
    if $step14<>0 then
        msgbox(16,$title1,"Unable to start rasman")
    exit
    endif
MsgBox(64,$title1,$successn)
    Return
EndFunc
;
;===========================================================================================
;For Command Line Extention BartPE
;===========================================================================================
;
Func _Start_BartPECMD()
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(7,$clineb,"Installing ms_server")
    $step01=RunWait("bartpe.exe -v -c s -i ms_server","",@SW_HIDE)
    if $step01<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_server")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(14,$clineb,"Installing ms_l2tp")
    $step02=RunWait("bartpe.exe -v -c p -i ms_l2tp","",@SW_HIDE)
    if $step02<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_l2tp")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(21,$clineb,"Installing ms_pptp")
    $step03=RunWait("bartpe.exe -v -c p -i ms_pptp","",@SW_HIDE)
    if $step03<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_pptp")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(28,$clineb,"Installing ms_pppoe")
    $step04=RunWait("bartpe.exe -v -c p -i ms_pppoe","",@SW_HIDE)
    if $step04<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_pppoe")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(35,$clineb,"Installing ms_wanarp")
    $step05=RunWait("bartpe.exe -v -c p -i ms_wanarp","",@SW_HIDE)
    if $step05<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_wanarp")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(42,$clineb,"Installing ms_ndiswan")
    $step06=RunWait("bartpe.exe -v -c p -i ms_ndiswan","",@SW_HIDE)
;if $step06<>0 then
    ;ProgressOff()
    ;msgbox(16,$title1,"Unable to install MS Server")
;exit
;endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(49,$clineb,"Installing ms_ndisuio")
    $step07=RunWait("bartpe.exe -v -c p -i ms_ndisuio","",@SW_HIDE)
    if $step07<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_ndisuio")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(56,$clineb,"Installing ms_wzcsvc")
    $step08=RunWait("bartpe.exe -v -c s -i ms_wzcsvc","",@SW_HIDE)
    if $step08<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_wzcsvc")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(63,$clineb,"Starting wzcsvc")
    $step09=RunWait("net start wzcsvc","",@SW_HIDE)
    if $step09<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to start wzcsvc")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(70,$clineb,"Starting tapisrv")
    $step10=RunWait("net start tapisrv","",@SW_HIDE)
    if $step10<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to start tapisrv")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(77,$clineb,"Installing ms_rasman")
    $step11=RunWait("bartpe.exe -v -c s -i ms_rasman","",@SW_HIDE)
    if $step11<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_rasman")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(84,$clineb,"Installing ms_rassrv")
    $step12=RunWait("bartpe.exe -v -c s -i ms_rassrv","",@SW_HIDE)
    if $step12<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_rassrv")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(91,$clineb,"Installing ms_rascli")
    $step13=RunWait("bartpe.exe -v -c s -i ms_rascli","",@SW_HIDE)
;if $step13<>0 then
    ;ProgressOff()
    ;msgbox(16,$title1,"Unable to install ms_rascli")
;exit
;endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(100,$clineb,"Starting rasman")
    $step14=RunWait("net start rasman","",@SW_HIDE)
    if $step14<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to start rasman")
    exit
endif
Splashoff()
MsgBox(64,$title1,$successb)
    Return
EndFunc
;
;===========================================================================================
;For Command Line Extention NetCFG
;===========================================================================================
;
Func _Start_NetcfgCMD()
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(7,$clinen,"Installing ms_server")
    $step01=RunWait("netcfg.exe -v -c s -i ms_server","",@SW_HIDE)
    if $step01<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_server")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(14,$clinen,"Installing ms_l2tp")
    $step02=RunWait("netcfg.exe -v -c p -i ms_l2tp","",@SW_HIDE)
    if $step02<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_l2tp")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(21,$clinen,"Installing ms_pptp")
    $step03=RunWait("netcfg.exe -v -c p -i ms_pptp","",@SW_HIDE)
    if $step03<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_pptp")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(28,$clinen,"Installing ms_pppoe")
    $step04=RunWait("netcfg.exe -v -c p -i ms_pppoe","",@SW_HIDE)
    if $step04<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_pppoe")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(35,$clinen,"Installing ms_wanarp")
    $step05=RunWait("netcfg.exe -v -c p -i ms_wanarp","",@SW_HIDE)
    if $step05<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_wanarp")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(42,$clinen,"Installing ms_ndiswan")
    $step06=RunWait("netcfg.exe -v -c p -i ms_ndiswan","",@SW_HIDE)
    if $step06<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install MS Server")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(49,$clinen,"Installing ms_ndisuio")
    $step07=RunWait("netcfg.exe -v -c p -i ms_ndisuio","",@SW_HIDE)
    if $step07<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_ndisuio")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(56,$clinen,"Installing ms_wzcsvc")
    $step08=RunWait("netcfg.exe -v -c s -i ms_wzcsvc","",@SW_HIDE)
    if $step08<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_wzcsvc")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(63,$clinen,"Starting wzcsvc")
    $step09=RunWait("net start wzcsvc","",@SW_HIDE)
    if $step09<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to start wzcsvc")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(70,$clinen,"Starting tapisrv")
    $step10=RunWait("net start tapisrv","",@SW_HIDE)
    if $step10<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to start tapisrv")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(77,$clinen,"Installing ms_rasman")
    $step11=RunWait("netcfg.exe -v -c s -i ms_rasman","",@SW_HIDE)
    if $step11<>0 then
        ProgressOff()   
        msgbox(16,$title1,"Unable to install ms_rasman")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(84,$clinen,"Installing ms_rassrv")
    $step12=RunWait("netcfg.exe -v -c s -i ms_rassrv","",@SW_HIDE)
    if $step12<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_rassrv")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(91,$clinen,"Installing ms_rascli")
    $step13=RunWait("netcfg.exe -v -c s -i ms_rascli","",@SW_HIDE)
;if $step13<>0 then
    ;ProgressOff()
    ;msgbox(16,$title1,"Unable to install ms_rascli")
;exit
;endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(100,$clinen,"Starting rasman")
    $step14=RunWait("net start rasman","",@SW_HIDE)
    if $step14<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to start rasman")
    exit
endif
ProgressOff()
MsgBox(64,$title1,$successn)
    Return
EndFunc
Link to comment
Share on other sites

I think you would get more response if you provided a smaller concept script. Just my 2 cents worth of thought :D

Link to comment
Share on other sites

he wants text on his progress bar basically, u just got to remove all the checks and itll go straight to the GUI

GUICreate("Internet Service Manager v0.08", 276, 190, -1, -1, BitOR($WS_EX_MDICHILD, $WS_EX_APPWINDOW, $WS_EX_LEFTSCROLLBAR, $WS_EX_OVERLAPPEDWINDOW, $WS_EX_CLIENTEDGE))
$Group_1 = GuiCtrlCreateGroup("ISM-Menu", 10, 1, 256, 68)
GUICtrlSetColor(-1,0xAE333D)
$Radio_1 = GUICtrlCreateRadio("Start Internet Service With &Netcfg.exe", 35, 15, 200, 20)
GUICtrlSetColor(-1,0x0116d1)
$Radio_2 = GUICtrlCreateRadio("Start Internet Service With &Bartpe.exe", 35 , 40, 200, 20)
GUICtrlSetColor(-1,0x0116d1)
$Button_3 = GUICtrlCreateButton("&START", 70, 75, 135, 20, BitOR($BS_FLAT, $WS_BORDER, $WS_EX_STATICEDGE))
$Progress_4 = GUICtrlCreateProgress(18, 115, 240, 20)
GUICtrlSetColor(-1,12396489)
$Group_2 = GuiCtrlCreateGroup("Instalation Progress", 10, 98, 256, 48)
GUICtrlSetColor(-1,0xff0000)
GUICtrlSetState($Radio_1, $GUI_CHECKED)
$ism = GUICtrlCreateMenu ("&ISM")
$exit = GUICtrlCreateMenuitem ("E&xit",$ism)
$helpmenu = GUICtrlCreateMenu ("?")
$infoitem = GUICtrlCreateMenuitem ("&Help",$helpmenu)
GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $Button_3
            Select
                Case GUICtrlRead($Radio_1) = $GUI_CHECKED
                    _Start_Netcfg()
                    ExitLoop
                Case GUICtrlRead($Radio_2) = $GUI_CHECKED
                    _Start_BartPE()
                    ExitLoop
            EndSelect
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
    If $msg = $infoitem Then Msgbox(0,$title2,$abouthelp)
    If $msg = $exit Then ExitLoop
    Sleep(10);keep Processor Utilization down
WEnd
; ================================================================================
; Function _Start_BartPE()
; ================================================================================
Func _Start_BartPE()
    AutoItWinSetTitle ( $title1 )
    GUICtrlSetData($Progress_4,7)
    $step01=RunWait("bartpe.exe -v -c s -i ms_server","",@SW_HIDE)
    if $step01<>0 then
        msgbox(16,$title1,"Unable to install ms_server")
    exit
endif
    GUICtrlSetData($Progress_4,14)
    $step02=RunWait("bartpe.exe -v -c p -i ms_l2tp","",@SW_HIDE)
    if $step02<>0 then
        msgbox(16,$title1,"Unable to install ms_l2tp")
    exit
endif
    GUICtrlSetData($Progress_4,21)
    $step03=RunWait("bartpe.exe -v -c p -i ms_pptp","",@SW_HIDE)
    if $step03<>0 then
        msgbox(16,$title1,"Unable to install ms_pptp")
    exit
endif
    GUICtrlSetData($Progress_4,28)
    $step04=RunWait("bartpe.exe -v -c p -i ms_pppoe","",@SW_HIDE)
    if $step04<>0 then
        msgbox(16,$title1,"Unable to install ms_pppoe")
    exit
endif
    GUICtrlSetData($Progress_4,35)
    $step05=RunWait("bartpe.exe -v -c p -i ms_wanarp","",@SW_HIDE)
    if $step05<>0 then
        msgbox(16,$title1,"Unable to install ms_wanarp")
    exit
endif
    GUICtrlSetData($Progress_4,42)
    $step06=RunWait("bartpe.exe -v -c p -i ms_ndiswan","",@SW_HIDE)
;Problem with ExitCode
;if $step06<>0 then
    ;msgbox(16,$title1,"Unable to install MS Server")
;exit
;endif
    GUICtrlSetData($Progress_4,49)
    $step07=RunWait("bartpe.exe -v -c p -i ms_ndisuio","",@SW_HIDE)
    if $step07<>0 then
        msgbox(16,$title1,"Unable to install ms_ndisuio")
    exit
endif
    GUICtrlSetData($Progress_4,56)
    $step08=RunWait("bartpe.exe -v -c s -i ms_wzcsvc","",@SW_HIDE)
    if $step08<>0 then
        msgbox(16,$title1,"Unable to install ms_wzcsvc")
    exit
endif
    GUICtrlSetData($Progress_4,63)
    $step09=RunWait("net start wzcsvc","",@SW_HIDE)
    if $step09<>0 then
        msgbox(16,$title1,"Unable to start wzcsvc")
    exit
endif
    GUICtrlSetData($Progress_4,70)
    $step10=RunWait("net start tapisrv","",@SW_HIDE)
    if $step10<>0 then
        msgbox(16,$title1,"Unable to start tapisrv")
    exit
endif
    GUICtrlSetData($Progress_4,77)
    $step11=RunWait("bartpe.exe -v -c s -i ms_rasman","",@SW_HIDE)
    if $step11<>0 then
        msgbox(16,$title1,"Unable to install ms_rasman")
    exit
endif
    GUICtrlSetData($Progress_4,84)
    $step12=RunWait("bartpe.exe -v -c s -i ms_rassrv","",@SW_HIDE)
    if $step12<>0 then
        msgbox(16,$title1,"Unable to install ms_rassrv")
    exit
endif
    GUICtrlSetData($Progress_4,91)
    $step13=RunWait("bartpe.exe -v -c s -i ms_rascli","",@SW_HIDE)
;if $step13<>0 then
    ;msgbox(16,$title1,"Unable to install ms_rascli")
;exit
;endif
    GUICtrlSetData($Progress_4,100)
    $step14=RunWait("net start rasman","",@SW_HIDE)
    if $step14<>0 then
        msgbox(16,$title1,"Unable to start rasman")
    exit
endif
MsgBox(64,$title1,$successb)
    Return
EndFunc ; ==> _Start_BartPE()
; ================================================================================
; Function _Start_Netcfg()
; ================================================================================
Func _Start_Netcfg()
    AutoItWinSetTitle ( "Internet Service Manager By JusThinK" )
    GUICtrlSetData($Progress_4,7)
    $step01=RunWait("netcfg.exe -v -c s -i ms_server","",@SW_HIDE)
    if $step01<>0 then
        msgbox(16,$title1,"Unable to install ms_server")
    exit
endif
    GUICtrlSetData($Progress_4,14)
    $step02=RunWait("netcfg.exe -v -c p -i ms_l2tp","",@SW_HIDE)
    if $step02<>0 then
        msgbox(16,$title1,"Unable to install ms_l2tp")
    exit
endif
    GUICtrlSetData($Progress_4,21)
    $step03=RunWait("netcfg.exe -v -c p -i ms_pptp","",@SW_HIDE)
    if $step03<>0 then
        msgbox(16,$title1,"Unable to install ms_pptp")
    exit
endif
    GUICtrlSetData($Progress_4,28)
    $step04=RunWait("netcfg.exe -v -c p -i ms_pppoe","",@SW_HIDE)
    if $step04<>0 then
        msgbox(16,$title1,"Unable to install ms_pppoe")
    exit
endif
    GUICtrlSetData($Progress_4,35)
    $step05=RunWait("netcfg.exe -v -c p -i ms_wanarp","",@SW_HIDE)
    if $step05<>0 then
        msgbox(16,$title1,"Unable to install ms_wanarp")
    exit
endif
    GUICtrlSetData($Progress_4,42)
    $step06=RunWait("netcfg.exe -v -c p -i ms_ndiswan","",@SW_HIDE)
    if $step06<>0 then
        msgbox(16,$title1,"Unable to install MS Server")
    exit
endif
    GUICtrlSetData($Progress_4,49)
    $step07=RunWait("netcfg.exe -v -c p -i ms_ndisuio","",@SW_HIDE)
    if $step07<>0 then
        msgbox(16,$title1,"Unable to install ms_ndisuio")
    exit
endif
    GUICtrlSetData($Progress_4,56)
    $step08=RunWait("netcfg.exe -v -c s -i ms_wzcsvc","",@SW_HIDE)
    if $step08<>0 then
        msgbox(16,$title1,"Unable to install ms_wzcsvc")
    exit
endif
    GUICtrlSetData($Progress_4,63)
    $step09=RunWait("net start wzcsvc","",@SW_HIDE)
    if $step09<>0 then
        msgbox(16,$title1,"Unable to start wzcsvc")
    exit
endif
    GUICtrlSetData($Progress_4,70)
    $step10=RunWait("net start tapisrv","",@SW_HIDE)
    if $step10<>0 then
        msgbox(16,$title1,"Unable to start tapisrv")
    exit
endif
    GUICtrlSetData($Progress_4,77)
    $step11=RunWait("netcfg.exe -v -c s -i ms_rasman","",@SW_HIDE)
    if $step11<>0 then
        msgbox(16,$title1,"Unable to install ms_rasman")
    exit
endif
    GUICtrlSetData($Progress_4,84)
    $step12=RunWait("netcfg.exe -v -c s -i ms_rassrv","",@SW_HIDE)
    if $step12<>0 then
        msgbox(16,$title1,"Unable to install ms_rassrv")
    exit
endif
    GUICtrlSetData($Progress_4,91)
    $step13=RunWait("netcfg.exe -v -c s -i ms_rascli","",@SW_HIDE)
;if $step13<>0 then
    ;msgbox(16,$title1,"Unable to install ms_rascli")
;exit
;endif
    GUICtrlSetData($Progress_4,100)
    $step14=RunWait("net start rasman","",@SW_HIDE)
    if $step14<>0 then
        msgbox(16,$title1,"Unable to start rasman")
    exit
    endif
MsgBox(64,$title1,$successn)
    Return
EndFunc
;
;===========================================================================================
;For Command Line Extention BartPE
;===========================================================================================
;
Func _Start_BartPECMD()
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(7,$clineb,"Installing ms_server")
    $step01=RunWait("bartpe.exe -v -c s -i ms_server","",@SW_HIDE)
    if $step01<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_server")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(14,$clineb,"Installing ms_l2tp")
    $step02=RunWait("bartpe.exe -v -c p -i ms_l2tp","",@SW_HIDE)
    if $step02<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_l2tp")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(21,$clineb,"Installing ms_pptp")
    $step03=RunWait("bartpe.exe -v -c p -i ms_pptp","",@SW_HIDE)
    if $step03<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_pptp")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(28,$clineb,"Installing ms_pppoe")
    $step04=RunWait("bartpe.exe -v -c p -i ms_pppoe","",@SW_HIDE)
    if $step04<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_pppoe")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(35,$clineb,"Installing ms_wanarp")
    $step05=RunWait("bartpe.exe -v -c p -i ms_wanarp","",@SW_HIDE)
    if $step05<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_wanarp")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(42,$clineb,"Installing ms_ndiswan")
    $step06=RunWait("bartpe.exe -v -c p -i ms_ndiswan","",@SW_HIDE)
;if $step06<>0 then
    ;ProgressOff()
    ;msgbox(16,$title1,"Unable to install MS Server")
;exit
;endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(49,$clineb,"Installing ms_ndisuio")
    $step07=RunWait("bartpe.exe -v -c p -i ms_ndisuio","",@SW_HIDE)
    if $step07<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_ndisuio")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(56,$clineb,"Installing ms_wzcsvc")
    $step08=RunWait("bartpe.exe -v -c s -i ms_wzcsvc","",@SW_HIDE)
    if $step08<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_wzcsvc")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(63,$clineb,"Starting wzcsvc")
    $step09=RunWait("net start wzcsvc","",@SW_HIDE)
    if $step09<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to start wzcsvc")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(70,$clineb,"Starting tapisrv")
    $step10=RunWait("net start tapisrv","",@SW_HIDE)
    if $step10<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to start tapisrv")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(77,$clineb,"Installing ms_rasman")
    $step11=RunWait("bartpe.exe -v -c s -i ms_rasman","",@SW_HIDE)
    if $step11<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_rasman")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(84,$clineb,"Installing ms_rassrv")
    $step12=RunWait("bartpe.exe -v -c s -i ms_rassrv","",@SW_HIDE)
    if $step12<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_rassrv")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(91,$clineb,"Installing ms_rascli")
    $step13=RunWait("bartpe.exe -v -c s -i ms_rascli","",@SW_HIDE)
;if $step13<>0 then
    ;ProgressOff()
    ;msgbox(16,$title1,"Unable to install ms_rascli")
;exit
;endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(100,$clineb,"Starting rasman")
    $step14=RunWait("net start rasman","",@SW_HIDE)
    if $step14<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to start rasman")
    exit
endif
Splashoff()
MsgBox(64,$title1,$successb)
    Return
EndFunc
;
;===========================================================================================
;For Command Line Extention NetCFG
;===========================================================================================
;
Func _Start_NetcfgCMD()
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(7,$clinen,"Installing ms_server")
    $step01=RunWait("netcfg.exe -v -c s -i ms_server","",@SW_HIDE)
    if $step01<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_server")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(14,$clinen,"Installing ms_l2tp")
    $step02=RunWait("netcfg.exe -v -c p -i ms_l2tp","",@SW_HIDE)
    if $step02<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_l2tp")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(21,$clinen,"Installing ms_pptp")
    $step03=RunWait("netcfg.exe -v -c p -i ms_pptp","",@SW_HIDE)
    if $step03<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_pptp")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(28,$clinen,"Installing ms_pppoe")
    $step04=RunWait("netcfg.exe -v -c p -i ms_pppoe","",@SW_HIDE)
    if $step04<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_pppoe")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(35,$clinen,"Installing ms_wanarp")
    $step05=RunWait("netcfg.exe -v -c p -i ms_wanarp","",@SW_HIDE)
    if $step05<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_wanarp")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(42,$clinen,"Installing ms_ndiswan")
    $step06=RunWait("netcfg.exe -v -c p -i ms_ndiswan","",@SW_HIDE)
    if $step06<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install MS Server")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(49,$clinen,"Installing ms_ndisuio")
    $step07=RunWait("netcfg.exe -v -c p -i ms_ndisuio","",@SW_HIDE)
    if $step07<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_ndisuio")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(56,$clinen,"Installing ms_wzcsvc")
    $step08=RunWait("netcfg.exe -v -c s -i ms_wzcsvc","",@SW_HIDE)
    if $step08<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_wzcsvc")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(63,$clinen,"Starting wzcsvc")
    $step09=RunWait("net start wzcsvc","",@SW_HIDE)
    if $step09<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to start wzcsvc")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(70,$clinen,"Starting tapisrv")
    $step10=RunWait("net start tapisrv","",@SW_HIDE)
    if $step10<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to start tapisrv")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(77,$clinen,"Installing ms_rasman")
    $step11=RunWait("netcfg.exe -v -c s -i ms_rasman","",@SW_HIDE)
    if $step11<>0 then
        ProgressOff()    
        msgbox(16,$title1,"Unable to install ms_rasman")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(84,$clinen,"Installing ms_rassrv")
    $step12=RunWait("netcfg.exe -v -c s -i ms_rassrv","",@SW_HIDE)
    if $step12<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to install ms_rassrv")
    exit
endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(91,$clinen,"Installing ms_rascli")
    $step13=RunWait("netcfg.exe -v -c s -i ms_rascli","",@SW_HIDE)
;if $step13<>0 then
    ;ProgressOff()
    ;msgbox(16,$title1,"Unable to install ms_rascli")
;exit
;endif
    ProgressOn($title1,"Run BartPe.exe")
    ProgressSet(100,$clinen,"Starting rasman")
    $step14=RunWait("net start rasman","",@SW_HIDE)
    if $step14<>0 then
        ProgressOff()
        msgbox(16,$title1,"Unable to start rasman")
    exit
endif
ProgressOff()
MsgBox(64,$title1,$successn)
    Return
EndFunc
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...