Sign in to follow this  
Followers 0
apollo13

Problem with _RunDOS.

4 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by apollo13

Share this post


Link to post
Share on other sites

change your " to ""

eg. if you want to run

copy "file1" "file2"

then use this

_rundos ("copy ""file1"" ""file2""")

;)

Share this post


Link to post
Share on other sites

Thank you very much.

Now run very well using your suggestion.

Best regards

Share this post


Link to post
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
Sign in to follow this  
Followers 0