Guest Muestafa1 Posted April 4, 2005 Share Posted April 4, 2005 I have a script that will launch multiple setup routines based on what apps a user selects to have installed. I use a loop that goes through an array of check boxes and an array of executable paths to do the install.I'm able to launch a .vbs using the following line outside of the loopRunWait(@Comspec & ' /c cscript.exe "' & "\\appserver\applications\setups\setups.vbs")I would like to be able to launch setup.vbs using my loop by setting one of the applications paths values in my array to be equal to the values in the parenthesis above. The only combination i could get to compile was the syntax below (using ' as seperators instead of "), but it doesn't run the .vbs file, instead it throws an error. The loop will work fine with more standard paths such as $appPath[1] = "\\appserver\applications\app.exe". Can any quote masters please help me to get this run?Thanks for your help!Code snipet:$appPath[9]= "@Comspec & '/c cscript.exe ' & '\\appserver\applications\setups\setups.vbs'"msgbox (4096,"test", $appPath[9]) for $i = 0 to $appscount if GuiCtrlRead($appcheckbox[$i]) = $GUI_CHECKED Then $path = $appPath[$i] Runwait($Path) endif next Link to comment Share on other sites More sharing options...
GaryFrost Posted April 4, 2005 Share Posted April 4, 2005 $appPath[9]= @Comspec & ' /c ' & "cscript.exe \\appserver\applications\setups\setups.vbs" SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Guest Muestafa1 Posted April 4, 2005 Share Posted April 4, 2005 $appPath[9]= @Comspec & ' /c ' & "cscript.exe \\appserver\applications\setups\setups.vbs"<{POST_SNAPBACK}>Thanks for your quick response!... I actually had that at one time but an error with my checkbox numbering was causing it to look to a non existent path. When I pasted in the code you gave I was still getting the error... now that the numbering is cleared up, it works great! Thanks gafrost! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now