Sign in to follow this  
Followers 0
twlight

multiple exe's from one script

10 posts in this topic

hello,

I'm trying to run multiple exe's from different locations, but I'm not sure as how to do it. also, if instead i wanted to comple 3 scripts into a single script am i able to do that as well?

Share this post


Link to post
Share on other sites



hello,

I'm trying to run multiple exe's from different locations, but I'm not sure as how to do it. also, if instead i wanted to comple 3 scripts into a single script am i able to do that as well?

As for running multiple .exes, Just specify three different run commands

Run("Path to .exe #1")
Run("Path to .exe #2")
Run("Path to .exe #3")

As to whether 3 scripts can be combined, It depends on the scripts, I could help you more if you posted them

Share this post


Link to post
Share on other sites

As for running multiple .exes, Just specify three different run commands

Run("Path to .exe #1")
Run("Path to .exe #2")
Run("Path to .exe #3")

As to whether 3 scripts can be combined, It depends on the scripts, I could help you more if you posted them

ok, the problem is i have iso's that i need installed over the network, but i don't know how to make the script call these exes over a network (i.e having the iso's on a net drive) here is my script, its easy to see where it can be combined but im not sure how to go about it

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.1.1.0
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------
Dim $scriptHandler
$scriptHandler = 0
; Script Start - Add your code below here
;runing the core install exe
Run("Setup.exe")
;waiting for active windows
WinWaitActive("Autodesk Setup","required support components")
Send("{ENTER}")
;now you gotta wait for directx to install fully then go from there!
Winwaitactive("AutoCAD 2007 Setup","may result in severe civil")
Send("{ENTER}")
;EULA fun bags
WinWaitActive("AutoCAD 2007 Setup","Country or Region")
Send("!a")
Send("{ENTER}")
;User information!
winwaitactive("AutoCAD 2007 Setup","you enter here is permanent")
;Dealer information
ControlSend ("AutoCAD 2007 Setup", "you enter here is permanent",1013,"jjj")
ControlSend ("AutoCAD 2007 Setup", "you enter here is permanent",1014,"jjj")
Send("{ENTER}")
;Typical Install is fine
WinWaitActive("AutoCAD 2007 Setup", "The most common application features")
Send("{ENTER}")
;installing optional tools!
Winwaitactive("AutoCAD 2007 Setup", "Select optional tools")
ControlClick("AutoCAD 2007 Setup", "Double-byte",1070)
ControlClick("AutoCAD 2007 Setup", "Double-byte",1071)
Send("{ENTER}")
;Destination Folder
WinWaitActive("AutoCAD 2007 Setup", "will install the files")
Send("{ENTER}")
;ShortCuts
WinWaitActive("AutoCAD 2007 Setup", "Choose a default text editor")
ControlClick("AutoCAD 2007 Setup", "Display the AutoCAD", 1052)
Send("{ENTER}")
;Yea im ready duh
WinWaitActive("AutoCAD 2007 Setup", "Are you ready to begin")
Send("{ENTER}")
;Time passes
;no i never want to view a readme
WinWaitActive("AutoCAD 2007 Setup", "Readme before starting AutoCAD")
ControlClick("AutoCAD 2007 Setup", "Display the AutoCAD", 1025)
Send("{ENTER}")
$scriptHandler=+1
If $scriptHandler == 1 Then
;running core vis setup.
Run("Setup.exe"[,"C:\Autocad Test\Vis\Bin\VIZFeui"])
;Finally gosh!
WinWaitActive("Autodesk VIZ 2007 Setup", "possible under law.")
Send("{ENTER}")
;EULAAAAAH This worked the same as the autoCAD setup eula.
WinWaitActive("Autodesk VIZ 2007 Setup", "I do not accept")
Send("!a")
Send("{ENTER}")
;personalize your vis install
ControlSend ("Autodesk VIZ 2007 Setup", "Enter the following information",1414,"PSO")
ControlSend ("Autodesk VIZ 2007 Setup", "Enter the following information",1386,"SIUC")
ControlSend ("Autodesk VIZ 2007 Setup", "Enter the following information",1249,"Plant service operations")
Send("{ENTER}")
;Select features that you wont be selecting
WinWaitActive("Autodesk VIZ 2007 Setup", "Please select which")
Send("{ENTER}")
;sattalite port
WinWaitActive("Autodesk VIZ 2007 Setup", "Please configure")
Send("{ENTER}")
;Click next!
WinWaitActive("Autodesk VIZ 2007 Setup","Click Next")
Send("{ENTER}")
;installin.....
WinWaitActive("Autodesk VIZ 2007 Setup","Click the Finish")
Send("{ENTER}")
$scriptHandler++
ElseIf then
    run("Setup.exe"[,"C:\Autocad Test\ad\Install"])
;required components!
    WinWaitActive("Autodesk Setup" , "Some support components")
    Send("{ENTER}")
;Welcome to the install
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup","Welcome to the Autodesk")
    Send("{ENTER}")
;EULAAAAAH This worked the same as the autoCAD/Vis setup eula.
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup", "Country or Region")
    Send("!a")
    Send("{ENTER}")
;User information
    ControlSend ("Autodesk Architectural Desktop 2007 Setup", "you enter here is permanent",1013,"jjj")
    ControlSend ("Autodesk Architectural Desktop 2007 Setup", "you enter here is permanent",1014,"jjj")
    Send("{ENTER}")
;regular install
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup", "The most common application features")
    Send("{ENTER}")
;install path
    winwaitactive("Autodesk Architectural Desktop 2007 Setup","Select the destination folder.")
    Send("{ENTER}")
;File locations (not install path)
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup","Configure File Locations")
    Send("{ENTER}")
;no desktop shorts
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup","Choose Text Editor")
    ControlClick("Autodesk Architectural Desktop 2007 Setup", "Create Architectural Desktop 2007",1052)
    Send("{ENTER}")
;Yes im ready...
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup","Are you ready to begin installation?")
    Send("{ENTER}")
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup","Autodesk Architectural Desktop 2007 has been")
    Send("{ENTER}")
else
    MsgBox(0x1, "Darn!", "Something is wrong with the next install... Check the scripts, file paths etc..")
endif

Share this post


Link to post
Share on other sites

ok, the problem is i have iso's that i need installed over the network, but i don't know how to make the script call these exes over a network (i.e having the iso's on a net drive) here is my script, its easy to see where it can be combined but im not sure how to go about it

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.1.1.0
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------
Dim $scriptHandler
$scriptHandler = 0
; Script Start - Add your code below here
;runing the core install exe
Run("Setup.exe")
;waiting for active windows
WinWaitActive("Autodesk Setup","required support components")
Send("{ENTER}")
;now you gotta wait for directx to install fully then go from there!
Winwaitactive("AutoCAD 2007 Setup","may result in severe civil")
Send("{ENTER}")
;EULA fun bags
WinWaitActive("AutoCAD 2007 Setup","Country or Region")
Send("!a")
Send("{ENTER}")
;User information!
winwaitactive("AutoCAD 2007 Setup","you enter here is permanent")
;Dealer information
ControlSend ("AutoCAD 2007 Setup", "you enter here is permanent",1013,"jjj")
ControlSend ("AutoCAD 2007 Setup", "you enter here is permanent",1014,"jjj")
Send("{ENTER}")
;Typical Install is fine
WinWaitActive("AutoCAD 2007 Setup", "The most common application features")
Send("{ENTER}")
;installing optional tools!
Winwaitactive("AutoCAD 2007 Setup", "Select optional tools")
ControlClick("AutoCAD 2007 Setup", "Double-byte",1070)
ControlClick("AutoCAD 2007 Setup", "Double-byte",1071)
Send("{ENTER}")
;Destination Folder
WinWaitActive("AutoCAD 2007 Setup", "will install the files")
Send("{ENTER}")
;ShortCuts
WinWaitActive("AutoCAD 2007 Setup", "Choose a default text editor")
ControlClick("AutoCAD 2007 Setup", "Display the AutoCAD", 1052)
Send("{ENTER}")
;Yea im ready duh
WinWaitActive("AutoCAD 2007 Setup", "Are you ready to begin")
Send("{ENTER}")
;Time passes
;no i never want to view a readme
WinWaitActive("AutoCAD 2007 Setup", "Readme before starting AutoCAD")
ControlClick("AutoCAD 2007 Setup", "Display the AutoCAD", 1025)
Send("{ENTER}")
$scriptHandler=+1
If $scriptHandler == 1 Then
;running core vis setup.
Run("Setup.exe"[,"C:\Autocad Test\Vis\Bin\VIZFeui"])
;Finally gosh!
WinWaitActive("Autodesk VIZ 2007 Setup", "possible under law.")
Send("{ENTER}")
;EULAAAAAH This worked the same as the autoCAD setup eula.
WinWaitActive("Autodesk VIZ 2007 Setup", "I do not accept")
Send("!a")
Send("{ENTER}")
;personalize your vis install
ControlSend ("Autodesk VIZ 2007 Setup", "Enter the following information",1414,"PSO")
ControlSend ("Autodesk VIZ 2007 Setup", "Enter the following information",1386,"SIUC")
ControlSend ("Autodesk VIZ 2007 Setup", "Enter the following information",1249,"Plant service operations")
Send("{ENTER}")
;Select features that you wont be selecting
WinWaitActive("Autodesk VIZ 2007 Setup", "Please select which")
Send("{ENTER}")
;sattalite port
WinWaitActive("Autodesk VIZ 2007 Setup", "Please configure")
Send("{ENTER}")
;Click next!
WinWaitActive("Autodesk VIZ 2007 Setup","Click Next")
Send("{ENTER}")
;installin.....
WinWaitActive("Autodesk VIZ 2007 Setup","Click the Finish")
Send("{ENTER}")
$scriptHandler++
ElseIf then
    run("Setup.exe"[,"C:\Autocad Test\ad\Install"])
;required components!
    WinWaitActive("Autodesk Setup" , "Some support components")
    Send("{ENTER}")
;Welcome to the install
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup","Welcome to the Autodesk")
    Send("{ENTER}")
;EULAAAAAH This worked the same as the autoCAD/Vis setup eula.
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup", "Country or Region")
    Send("!a")
    Send("{ENTER}")
;User information
    ControlSend ("Autodesk Architectural Desktop 2007 Setup", "you enter here is permanent",1013,"jjj")
    ControlSend ("Autodesk Architectural Desktop 2007 Setup", "you enter here is permanent",1014,"jjj")
    Send("{ENTER}")
;regular install
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup", "The most common application features")
    Send("{ENTER}")
;install path
    winwaitactive("Autodesk Architectural Desktop 2007 Setup","Select the destination folder.")
    Send("{ENTER}")
;File locations (not install path)
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup","Configure File Locations")
    Send("{ENTER}")
;no desktop shorts
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup","Choose Text Editor")
    ControlClick("Autodesk Architectural Desktop 2007 Setup", "Create Architectural Desktop 2007",1052)
    Send("{ENTER}")
;Yes im ready...
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup","Are you ready to begin installation?")
    Send("{ENTER}")
    WinWaitActive("Autodesk Architectural Desktop 2007 Setup","Autodesk Architectural Desktop 2007 has been")
    Send("{ENTER}")
else
    MsgBox(0x1, "Darn!", "Something is wrong with the next install... Check the scripts, file paths etc..")
endif
Quick bump

Share this post


Link to post
Share on other sites

Well, I dont know about your problem, But, You might want to use controlsends/controlclicks Instead of just Send()'s.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I notice your "run" commands have brackets "]" that need to be removed

Run("Setup.exe"[,"C:\Autocad Test\Vis\Bin\VIZFeui"])

should be

Run("Setup.exe","C:\Autocad Test\Vis\Bin\VIZFeui")

remove these brackets from all of the run commands in your script

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

You can combine three scripts into one, here's a quick example:

If $CmdLine[0] =1 Then
    Switch $CmdLine[1]
        Case "/1"
            Script1()
        Case "/2"
            Script2()
        Case "/3"
            Script3()
    EndSwitch
EndIf

Func Script1()
    MsgBox(0, @ScriptName, "This is the 1st script")
EndFunc

Func Script2()
    MsgBox(0, @ScriptName, "This is the 2nd script")
EndFunc

Func Script3()
    MsgBox(0, @ScriptName, "This is the 3rd script")
EndFunc

You can find a explanation about this in the helpfile, in paragraph "Command Line Parameters". Good luck!

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I notice your "run" commands have brackets "]" that need to be removed

Run("Setup.exe"[,"C:\Autocad Test\Vis\Bin\VIZFeui"])

should be

Run("Setup.exe","C:\Autocad Test\Vis\Bin\VIZFeui")

remove these brackets from all of the run commands in your script

I once made the same mistake. Whenever in the AutoIt helpfile there are brackets, it indicates the parameter within brackets is a so-called "Optional Parameter". This kind of parameter does not have to be specified in order for the function to work, but can be specified for extra functionality. Edited by Manadar

Share this post


Link to post
Share on other sites

Thanks alot guys/gals that was exactly what i needed! consider this thread finished!

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Credit to MHz, this is my current script.

Posted Image

#include <GUIConstants.au3>

Opt('ExpandEnvStrings', 1) ;this option allows you to use %environment% variables inside strings, e.g., "The temp directory is: %temp%".

;Settings
Global $timeout = 10 ; Timeout until auto-execute
Global $item_count = 38 ; Total amount of task to do ( ; < COMMAND X > )
; General Global variables
Global $counter ; Stores the items done so far
Global $time = TimerInit() ; Start countdown to auto execute

GUICreate('Installing Updates', 550, 350)
GUICtrlCreateGroup('', 15, 10, 520, 290) ; Open Group
GUICtrlCreateLabel('Installation status:', 40, 80)
$edit_display = GUICtrlCreateEdit('', 40, 100, 470, 100, BitOR($ES_AUTOVSCROLL, $WS_VSCROLL, $ES_READONLY), $WS_EX_STATICEDGE)
GUICtrlCreateLabel('Installing:', 40, 220)
$progress = GUICtrlCreateProgress(40, 240, 470, 25)
GUICtrlCreateGroup('', -99, -99, 1, 1) ; Close group.
$button_execute = GUICtrlCreateButton('&Execute', 380, 315, 70)
$button_cancel = GUICtrlCreateButton('&Cancel', 465, 315, 70)
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE, $button_cancel
            GUICtrlSetState($button_cancel, $GUI_DISABLE)
            Exit
        Case $button_execute
            GUICtrlSetState($button_execute, $GUI_DISABLE)
            ExitLoop
        Case Else
            $timediff = Int(TimerDiff($time)/1000)
            If $timediff > $timeout Then
                GUICtrlSetState($button_execute, $GUI_DISABLE)
                GUICtrlSetData($edit_display, 'Auto Execute commencing...' & @CRLF)
                ExitLoop
            EndIf
    EndSwitch
WEnd

; < COMMAND 1 >
_Progress('show hidden files and folders/show extensions...')
_Run('reg import %systemdrive%\OemPreinstall\View.reg', '', @SW_HIDE)

; < COMMAND 2 >
_Progress('Microsoft .NET Framework 1.1')
_Run('msiexec /i %systemdrive%\OemPreinstall\dotnetfx\netfx.msi /qn')

; < COMMAND 3 >
_Progress('Microsoft .NET Framework 2.0')
_Run('%systemdrive%\OemPreinstall\dotnetfx.exe /q:a /c:"install /l /q"')

; < COMMAND 4 >
_Progress('Security update for Microsoft .NET Framework 2.0')
_Run('%systemdrive%\OemPreinstall\KB917283.exe /qn')

; < COMMAND 5 >
_Progress('Security Update for Microsoft .NET Framework, Version 2.0')
_Run('%systemdrive%\OemPreinstall\KB922770.exe /qn')

; < COMMAND 6 >
_Progress('Office 2003 - This might take several minutes to complete')
_Run('msiexec /i %systemdrive%\OemPreinstall\Office\SETUP.EXE TRANSFORMS=PRO11.MST /qn')

; < COMMAND 7 >
_Progress('Office updates - This might take several minutes to complete')
_Run('%systemdrive%\OemPreinstall\Office\updates\updates.bat', '', @SW_HIDE)

; < COMMAND 8 >
_Progress("turning off the Office '03 Language Bar...")
_Run('reg import %systemdrive%\OemPreinstall\LangBar.reg', '', @SW_HIDE)

; < COMMAND 9 >
_Progress('Windows Media Player 11')
_Run('msiexec /i %systemdrive%\OemPreinstall\mpsetupedp.msi /qn')

; < COMMAND 10 >
_Progress('update for WMDRM-enabled players')
_Run('%systemdrive%\OemPreinstall\KB902344.exe /q')

; < COMMAND 11 >
_Progress('Security Update for Windows Media Player 10 for Windows XP (KB911565)')
_Run('%systemdrive%\OemPreinstall\KB911565.exe /q')

; < COMMAND 12 >
_Progress('HighMAT CD Writing Wizard')
_Run('%systemdrive%\OemPreinstall\HMTCD.exe /qn')

; < COMMAND 13 >
_Progress('Microsoft PowerToys for Windows XP - This may take a minute or two')
_Run('%systemdrive%\OemPreinstall\PowerToys\PowerToys.bat', '', @SW_HIDE)

; < COMMAND 14 >
_Progress('Microsoft Calculator Plus')
_Run('msiexec /i %systemdrive%\OemPreinstall\CalcPlus.msi /qn')

; < COMMAND 15 >
_Progress('Windows Media Connect 2.0')
_Run('%systemdrive%\OemPreinstall\wmcsetup.exe /q')

; < COMMAND 16 >
_Progress('Adobe Reader 7.0.7')
_Run('msiexec /i %systemdrive%\OemPreinstall\Adobe\7.07\Adobe.msi /qn')

; < COMMAND 17 >
_Progress('Accept Adobe Reader EULA...')
_Run('reg import %systemdrive%\OemPreinstall\Adobe\EULA.reg', '', @SW_HIDE)

; < COMMAND 18 >
_Progress('Hide the Yahoo! toolbar/Search The Internet menu (Adobe Reader)')
FileCopy("%systemdrive%\OemPreinstall\Adobe\disableYahooSearch.js", "C:\Program Files\Adobe\Acrobat 7.0\Reader\Javascripts\", 1)

; < COMMAND 19 >
_Progress("Disable 'Search The Internet' in the Search pane (Adobe Reader)")
FileMove("%systemdrive%\Program Files\Adobe\Acrobat 7.0\Reader\Javascripts\WebSearch.js", "%systemdrive%\Program Files\Adobe\Acrobat 7.0\Reader\Javascripts\WebSearch.old", 1)

; < COMMAND 20 >
_Progress('Shockwave Player 10')
_Run('%systemdrive%\OemPreinstall\Shockwave_Installer_Full.exe /S')
ProcessWait('iexplore.exe', 3)
ProcessClose('iexplore.exe')

; < COMMAND 21 >
_Progress('Security update for Flash player (Flash player Version 9)')
_Run('%systemdrive%\OemPreinstall\KB913433.exe /q:a /r:n')

; < COMMAND 22 >
_Progress('Windows Live Messenger 8.1 BETA')
_Run('msiexec /i %systemdrive%\OemPreinstall\MsnMsgs.msi /qn')

; < COMMAND 23 >
_Progress('Java Runtime Environment 5.0 Update 9')
_Run('%systemdrive%\OemPreinstall\jre-1_5_0_09-windows-i586-p-s.exe /s /v"/qn ADDLOCAL=ALL IEXPLORER=1 REBOOT=Suppress WEBSTARTICON=0')

; < COMMAND 24 >
_Progress('Symantec AntiVirus 10.0 Corporate Edition')
_Run('msiexec /i %systemdrive%\OemPreinstall\AntiVirus\AntiVirus.msi ENABLEAUTOPROTECT=1 RUNLIVEUPDATE=0 /qn')

; < COMMAND 25 >
_Progress('Close "Old Virus Definition File" window')
_Run('%systemdrive%\OemPreinstall\WinClose.exe')

; < COMMAND 26 >
_Progress('Updating Virus Protection Files -Release Date: November 7, 2006-')
_Run('%systemdrive%\OemPreinstall\definitions.exe /q')

; < COMMAND 27 >
_Progress('Internet Explorer 7 - This may take a minute or two')
_Run('%systemdrive%\OemPreinstall\IE7.exe /norestart /quiet /passive')

; < COMMAND 28 >
_Progress('WinRAR 3.61')
_Run('%systemdrive%\OemPreinstall\wrar361.exe /s')

; < COMMAND 29 >
_Progress('Disable Balloon Tips - Remove Messengers from Startup')
_Run('reg import %systemdrive%\OemPreinstall\BalloonTips.reg', '', @SW_HIDE)

; < COMMAND 30 >
_Progress('disable third-party tool bands')
_Run('reg import %systemdrive%\OemPreinstall\thirdparty.reg', '', @SW_HIDE)

; < COMMAND 31 >
_Progress('QuickTime 7.1.3')
_Run('msiexec /i %systemdrive%\OemPreinstall\QuickTime\QuickTime.msi /qn')
FileMove("%ProgramFiles%\QuickTime\qttask.exe", 'qttask')

; < COMMAND 32 >
_Progress('Remove Desktop icons')
FileDelete("C:\Documents and Settings\All Users\Desktop\*.*")

; < COMMAND 33 >
_Progress('Mozilla Firefox 1.5.0.7')
_Run('%systemdrive%\OemPreinstall\Firefox\setup.exe')

; < COMMAND 34 >
_Progress('VMware Workstation 5.5.2')
_Run('msiexec /i "%systemdrive%\OemPreinstall\VMware\VMware Workstation.msi" ADDLOCAL=ALL DESKTOP_SHORTCUT=0 SERIALNUMBER=xxxxx-xxxxx-xxxxx-xxxxx /qn')

; < COMMAND 35 >
_Progress('Network Diagnostic Tool')
_Run('%systemdrive%\OemPreinstall\KB914440.exe /q')

; < COMMAND 36 >
_Progress('Run the Photoshop installer')
Run(@ComSpec & ' /c ' & "msiexec /i %systemdrive%\OemPreinstall\Photoshop\Photoshop.msi /qn UNITYSELECTION=RETAIL SERIALNUMBERTEMP=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx",'',@SW_HIDE)

; < COMMAND 37 >
_Progress('Close the Photoshop Activation Window')
WinWaitActive("Adobe Photoshop Installer")
ControlClick("Adobe Photoshop Installer", "", "Button6")
WinWaitActive("Adobe Activation")
ControlClick("Adobe Activation", "", "Button1")

; < COMMAND 38 >
_Progress('Activate Photoshop')
FileCopy("%systemdrive%\OemPreinstall\Photoshop\B2B86000.dat", "%systemdrive%\Documents and Settings\All Users\Application Data\Adobe Systems\Product licenses\", 8)

;~ GUIDelete()
Run(@ComSpec & ' /c shutdown -r -f -t 300 -c "Finalizing installation"', '', @SW_HIDE) ; Restarting Computer in 5 minutes...

Exit

Func OnAutoItStart()
    ; Prevent 2nd instance
    If WinExists(@ScriptName & '_Interpreter') Then Exit
    AutoItWinSetTitle(@ScriptName & '_Interpreter')
EndFunc

Func _Progress($text)
    ; Update the edit control
    GUICtrlSetData($edit_display, $text & @CRLF, True)
    ; Update process control
    $counter += 1; update counter
    $percent = Int(100/$item_count*$counter); calculate percentage
    GUICtrlSetData($progress, $percent)
EndFunc

Func _Run($command, $workingdir = '', $flag = @SW_SHOW)
    ; Run a program...
    Local $pid = Run($command, $workingdir, $flag)
    While ProcessExists($pid)
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $button_cancel
                GUICtrlSetState($button_cancel, $GUI_DISABLE)
                _Progress('Preparing to close...')
                ProcessWaitClose($pid)
                Exit 1
        EndSwitch
    WEnd
EndFunc

Rather than have the programs that are being installed to be listed, I'd like to place a scroll with checkboxes in the group window, allowing the user to select items to be installed. I read a couple examples using if case=x then 'Run x script' - If case=y 'Run y script' etcetera, but I'd have to create and ungodly amount of scripts to account for every variation of selections that are possible.

I don't know how make the script install only the programs the user selects, The item_count would have to be changed on the fly etcetera.

This thread was the closest as I could get. Thank you.

Edited by rhaynes0010

Share this post


Link to post
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
Sign in to follow this  
Followers 0