Bodman Posted November 4, 2014 Share Posted November 4, 2014 Hi All, I am trying to convert a snip of code I use in a BAT file to autoit, but im falling down at the formatting of the "" and ' etc. this is my BAT line "C:\Program Files (x86)\M93\devcon.exe" update "C:\Program Files (x86)\M93\Display\Intel(R) HD Graphics 4600\kit64ib.inf" "PCI\VEN_8086&DEV_0412" and my attempt at a AutoIT line RunWait (@ComSpec & " /k " & @ProgramFilesDir & "\M93\devcon.exe" & " " & "update" & " " & @ProgramFilesDir & "\M93\Display\Intel(R) HD Graphics 4600\kit64ib.inf" & " " & "PCI\VEN_8086&DEV_0412","", @SW_MAXIMIZE) I know im close, but not just there. Thanks in advance for any help Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 4, 2014 Moderators Share Posted November 4, 2014 Personally, I usually execute directly, rather than using @ComSpec. Something like this: ShellExecuteWait(@ProgramFilesDir & "\M93\devcon.exe", "update " & @ProgramFilesDir & "\M93\Display\Intel(R) HD Graphics4600\kit64ib.inf PCI\VEN_8086&DEV_0412") Bodman 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
iamtheky Posted November 4, 2014 Share Posted November 4, 2014 (edited) msgbox(0, '' , @ComSpec & " /k " & @ProgramFilesDir & "\M93\devcon.exe" & " " & "update" & " " & @ProgramFilesDir & "\M93\Display\Intel(R) HD Graphics 4600\kit64ib.inf" & " " & "PCI\VEN_8086&DEV_0412") and you need to wrap your quotes, you will fail specifying the program files directory as it potentially has a space: msgbox (0, '' , '"' & @ProgramFilesDir & "\M93\devcon.exe" & '"') Edited November 4, 2014 by boththose Bodman 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
tonysing Posted November 5, 2014 Share Posted November 5, 2014 Why don't you just run the BAT file directly? ShellExecuteWait("nameofyourfile.bat", "", "", "open") Link to comment Share on other sites More sharing options...
Bodman Posted November 5, 2014 Author Share Posted November 5, 2014 Why don't you just run the BAT file directly? ShellExecuteWait("nameofyourfile.bat", "", "", "open") I actually tried that at first but I want to do this as part of a silent install and its easier to hide the window using autoit Link to comment Share on other sites More sharing options...
Bodman Posted November 5, 2014 Author Share Posted November 5, 2014 Thanks everyone for the replies, Im a little closer if I change the script to use ShellExecuteWait like this ShellExecuteWait (@ProgramFilesDir & "\M93\devcon.exe", "update " & chr(34) & @ProgramFilesDir & "\M93\Net\Intel(R) Wireless-N 7260\Netwsw02.inf" & chr(34) & " PCI\VEN_8086&DEV_08B2",@SW_HIDE ) it all works fine, but im back to my original problem I had just simply running a Bat file, - the command window appears I have used in the past (loooong time ago) files like CMDOW and Quiet to hide this type of window for silent installs, but I know that's not a good solution, any help please Link to comment Share on other sites More sharing options...
Solution bogQ Posted November 5, 2014 Solution Share Posted November 5, 2014 your @SW_HIDE parametar isn`t on correct place, look in the help file for where to place @SW_HIDE parametar on ShellExecuteWait command Bodman 1 TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Bodman Posted November 5, 2014 Author Share Posted November 5, 2014 your @SW_HIDE parametar isn`t on correct place, look in the help file for where to place @SW_HIDE parametar on ShellExecuteWait command Brilliant that was it, thank you 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