DemonAngel Posted February 2, 2006 Share Posted February 2, 2006 I am trying to run the following command. c:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE /a FlieNameAndPath from autoit. This is giving me invalid switches errors, but when I run the same command from dos or the run box in windows, it works fine. What would be the best method in AutoIT for running this command? Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted February 2, 2006 Moderators Share Posted February 2, 2006 Try this: $FileNameAndPath = "Whatever your filename and path is" Run(@ComSpec & " /c " & "c:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE /a " & $FileNameAndPath) Link to comment Share on other sites More sharing options...
ning Posted February 2, 2006 Share Posted February 2, 2006 Works for me, with:Run ('"c:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE" /a "E:\desktop.ini"')Note that the program filename and the attachment filename are surrounded by double quotes ("), and the whole expression is surrounded by single quotes (') so that the double quotes are not interpreted as the end of the string.ben Link to comment Share on other sites More sharing options...
flaxcrack Posted February 2, 2006 Share Posted February 2, 2006 Works for me, with: Run ('"c:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE" /a "E:\desktop.ini"') Note that the program filename and the attachment filename are surrounded by double quotes ("), and the whole expression is surrounded by single quotes (') so that the double quotes are not interpreted as the end of the string. ben Doh! Not Run() but RunWait() [quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD() 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