Sign in to follow this  
Followers 0
Bodman

Can anyone help me format this line "'"'"'"'""

8 posts in this topic

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

 

Share this post


Link to post
Share on other sites



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")
1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by boththose
1 person likes this

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

Why don't you just run the BAT file directly?

ShellExecuteWait("nameofyourfile.bat", "", "", "open")

Share this post


Link to post
Share on other sites

 

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

Share this post


Link to post
Share on other sites

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 :(

post-52553-0-88933300-1415178174_thumb.p

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

Share this post


Link to post
Share on other sites

your @SW_HIDE parametar isn`t on correct place, look in the help file for where to place @SW_HIDE parametar on ShellExecuteWait command

1 person likes this

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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.

 

Share this post


Link to post
Share on other sites

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 :)

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