mattw112 Posted December 17, 2008 Share Posted December 17, 2008 I'm trying to get this script to work and having an issue with quotes I believe. Basically I've tried every combination of Quotes, Double Quotes, single ticks, etc... If I have a command like below it works(no quotes inside): ShellExecuteWait(@ComSpec, '/c netsh advfirewall set allprofiles settings remotemanagement enable', @SystemDir, "", @SW_HIDE)oÝ÷ Øò!j÷r¦jwpØjº^²)ì×¢¶¤zÆ®¶se6VÆÄWV7WFUvB6öÕ7V2Âb33²ö2æWG6Gff&WvÆÂf&WvÆÂ6WB'VÆRw&÷WÙ4fÆRæB&çFW"6&æyBæWrVæ&ÆS×W2b33²Â77FVÔF"ÂgV÷C²gV÷C²Â5uôDRoÝ÷ Øý½æ¥²kçZºÚ"µÍÚ[^XÝ]UØZ] ÛÛTÜXË ][ÝËØÈ]ÚY]Ø[]Ø[Ù][HÜÝIÌÎNÑ[H[[Ú[ÉÌÎNÈ]È[XO^YÉ][ÝËÞÝ[Q ][ÝÉ][ÝËÕ×ÒQJBÚ[^XÝ]UØZ] ÛÛTÜXË ][ÝËØÈ]ÚY]Ø[]Ø[Ù][HÜÝI][ÝäÑ[H[[Ú[É][Ýå]È[XO^YÉ][ÝËÞÝ[Q ][ÝÉ][ÝËÕ×ÒQJBÚ[^XÝ]UØZ] ÛÛTÜXË ][ÝËØÈ]ÚY]Ø[]Ø[Ù][HÜÝIÌÎNÑ[H[[Ú[ÉÌÎNÈ]È[XO^YÉ][ÝËÞÝ[Q ][ÝÉ][ÝËÕ×ÒQJ I can run this command on the system from a cmd prompt and it works fine, so I know I have something messed up above. Thanks, Terry Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted December 17, 2008 Share Posted December 17, 2008 Try ShellExecuteWait(@ComSpec, "/c Netsh advfirewall firewall set rule group=""File and Printer Sharing"" new enable=yes", @SystemDir, "", @SW_HIDE) .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Developers Jos Posted December 17, 2008 Developers Share Posted December 17, 2008 you are sure this command works in a CMD window? : Netsh advfirewall firewall set rule group=File and Printer Sharing new enable=yes SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ProgAndy Posted December 17, 2008 Share Posted December 17, 2008 (edited) I'm trying to get this script to work and having an issue with quotes I believe. Basically I've tried every combination of Quotes, Double Quotes, single ticks, etc... If I have a command like below it works(no quotes inside): I can run this command on the system from a cmd prompt and it works fine, so I know I have something messed up above. Thanks, Terry your second example looks right, but you use wrong double quotes... you need "" not “” ShellExecuteWait(@ComSpec, '/c Netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=yes', @SystemDir, "", @SW_HIDE) Edited December 17, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
weaponx Posted December 17, 2008 Share Posted December 17, 2008 I agree with ProgAndy here. Link to comment Share on other sites More sharing options...
iHonda Posted December 17, 2008 Share Posted December 17, 2008 (edited) Im not sure because I'n on my XP lap top so i cant test it but this should work: ShellExecuteWait(@ComSpec & "/c Netsh advfirewall firewall set rule group='File and Printer Sharing' new enable=yes", @SystemDir, "", @SW_HIDE) edit nvm they are probably more correct than i am because i couldnt test it lol Edited December 17, 2008 by Zmaster A great place to start Autoit 1-2-3 Link to comment Share on other sites More sharing options...
weaponx Posted December 17, 2008 Share Posted December 17, 2008 I think the command line interpreter generally chokes on single quotes. Link to comment Share on other sites More sharing options...
mattw112 Posted December 17, 2008 Author Share Posted December 17, 2008 ProgAndy was right... I guess form all my copying and pasting and moving stuff around from documents to Autoit the quotes were the wrong type? So I needed "" not Funny that the SciTE editor doesn't pick that up on the compile or at least give a warning or something. I'll pay attention in the future. Thanks, Terry Link to comment Share on other sites More sharing options...
Developers Jos Posted December 17, 2008 Developers Share Posted December 17, 2008 Funny that the SciTE editor doesn't pick that up on the compile or at least give a warning or something. I'll pay attention in the future.Why would it? It are just characters in a literal string. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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