Jump to content

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


Bodman
 Share

Go to solution Solved by bogQ,

Recommended Posts

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

  • Moderators

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

"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

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

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

Link to comment
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

Link to comment
Share on other sites

  • Solution

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

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.

 
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...