Shadow_Delta Posted August 16, 2015 Share Posted August 16, 2015 HI, Right into the issue, I want to add and obtained path into a cmd command using a variable or any thing which works.The concept is to Obtain a file using $sPath = FileOpenDialog and giving the whole path including the file name and extension. Case $Button1 $sPath = FileOpenDialog("Open a file", @desktopdir, "All file (*.*)") GUICtrlSetData($Button1, $sPath) Case $Button2 $CMD = 'ccs.exe /line /pack /PackPath:[Obtained Path Here] RunWait('"' & @ComSpec & '" /k ' & $CMD, @SystemDir, @SW_SHOW) Link to comment Share on other sites More sharing options...
iamtheky Posted August 16, 2015 Share Posted August 16, 2015 (edited) closer?$CMD = 'ccs.exe /line /pack /PackPath:' & $sPath RunWait(@ComSpec & ' /k ' & $CMD, @SystemDir, @SW_SHOW) or if you need to wrap that path in quotes due to spaces$CMD = 'ccs.exe /line /pack /PackPath:' & '"' & $sPath & '"' RunWait(@ComSpec & ' /k ' & $CMD, @SystemDir, @SW_SHOW) Edited August 16, 2015 by boththose Shadow_Delta 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Shadow_Delta Posted August 16, 2015 Author Share Posted August 16, 2015 closer?$CMD = 'ccs.exe /line /pack /PackPath:' & $sPath RunWait(@ComSpec & ' /k ' & $CMD, @SystemDir, @SW_SHOW) That was easy, I was trying with '& $sPath' seems like the ' ' Was the problem.and it Works! Thank you. Link to comment Share on other sites More sharing options...
Shadow_Delta Posted August 16, 2015 Author Share Posted August 16, 2015 (edited) How can i execute the code one after another after multiple files have been selected?and a possible way to show the progress within the window as in like this. using my cmd code above?I'm Using Koda for the GUI purpose. Edited August 16, 2015 by Shadow_Delta Multiselect Done Link to comment Share on other sites More sharing options...
iamtheky Posted August 16, 2015 Share Posted August 16, 2015 https://www.autoitscript.com/autoit3/docs/functions/FileOpenDialog.htm $FD_MULTISELECT (4) = Allow MultiSelect and what is the output in the console when you run the ccs.exe command? does it show progress? ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Shadow_Delta Posted August 16, 2015 Author Share Posted August 16, 2015 (edited) https://www.autoitscript.com/autoit3/docs/functions/FileOpenDialog.htm and what is the output in the console when you run the ccs.exe command? does it show progress?I have set multi select, Yes, it's actually a small program to install cab files using DISM.exe.I want to set a box in which the progress will be shown.and possibly to make sure that the multiple files gets processed one after another. Case $Button1 $sPath = FileOpenDialog("Open a file", @desktopdir, "Cabinet Files (*.cab)",$FD_MULTISELECT) GUICtrlSetData($Button1, $sPath) Case $Button2 $CMD = 'DISM.exe /Online /Add-Package /PackagePath:' & $sPath RunWait('"' & @ComSpec & '" /k ' & $CMD, @SystemDir, @SW_SHOW) Edited August 16, 2015 by Shadow_Delta 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