apollo13 Posted June 16, 2012 Share Posted June 16, 2012 Hi, I have done Windows Xp virtualized with VirtualBox program. Now I want to mount a DVD-Drive from different ISO-Image choosing from 5 choices using a command of VirtualBox. Is I insert the command into a BATCH file it run very well, but if I put the string command in a file.AU3 and I run it, AutoIT cause an error. The command Syntax to run is (included quotation marks and hyphens): VBoxManage storageattach "Machine_Name" --storagectl "Controller_Name" --port 1 --device 0 --type dvddrive --medium "Path\Name.iso" In my computer the correct command that in Batch file run is: VBoxManage storageattach "73fc2221-78f4-4caf-8827-cf2f542a2527" --storagectl "Controller IDE" --port 1 --device 0 --type dvddrive --medium "D:\Translator\English Dictionary 2011.iso" This is the same string on AutoIT that don't run #include <Process.au3> _RunDos("VBoxManage storageattach "73fc2221-78f4-4caf-8827-cf2f542a2527" --storagectl "Controller IDE" --port 1 --device 0 --type dvddrive --medium "D:\Translator\English Dictionary 2011.iso"") Can you help me?? Thanks Link to comment Share on other sites More sharing options...
apollo13 Posted June 17, 2012 Author Share Posted June 17, 2012 (edited) I have done other tests and in my opinion AutoIT crashes because there are quotation marks and hyphens in the string command and autoIT Wants in begining of command: (" and then wait this: ") to the end of command but it found other quotations marks that causes error. What do you think about ? There are some solutions or the only way is inculding stringcommand on FILE.BAT as I already do? Thanks Edited June 17, 2012 by apollo13 Link to comment Share on other sites More sharing options...
boomingranny Posted June 17, 2012 Share Posted June 17, 2012 change your " to "" eg. if you want to run copy "file1" "file2" then use this _rundos ("copy ""file1"" ""file2""") Link to comment Share on other sites More sharing options...
apollo13 Posted June 17, 2012 Author Share Posted June 17, 2012 Thank you very much. Now run very well using your suggestion. Best regards 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