mist3r Posted May 30, 2007 Posted May 30, 2007 I need to be able to use " " quotes on the command but AutoIt throws an error. RunWait(@ComSpec & " /C c:\AutoIt\NETDOM.exe JOIN " & $ComputerName & " /d: " & $DomainName & " /ou:'OU=Curric Computers, DC=domain, DC=bleh, DC=bleh, DC=bleh, DC=uk' /ud: " & $DomainAdmin & " /pd: " & $domainPass & " /reboot:10 ") I have to put quotes around the /OU: "bleh bleh" for it to work. Ive tried using single quotes and that makes the netdom.exe command fail. Is there a way of forcing it to use ""? Like in PHP using a \" cancels it out... Thanks
BrettF Posted May 30, 2007 Posted May 30, 2007 (edited) Ahhh... The helpfile has your answer Strings are enclosed in double-quotes like "this". If you want a string to actually contain a double-quote use it twice like: "here is a ""double-quote"" - ok?"You can also use single-quotes like 'this' and 'here is a ' 'single-quote' ' - ok?' You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want. For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them: 'This "sentence" contains "lots" of "double-quotes" does it not?'is much simpler than: "This ""sentence"" contains ""lots"" of ""double-quotes"" does it not?"EDIT: BB Code... Edited May 30, 2007 by Bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
mist3r Posted May 30, 2007 Author Posted May 30, 2007 Aaah cheers Brett!! thanks alot I really appreciate it Your a star
BrettF Posted May 30, 2007 Posted May 30, 2007 Aaah cheers Brett!! thanks alot I really appreciate it Your a starThanks Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
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