Jump to content
Sign in to follow this  

How to pass the value of a variable to DOS

Recommended Posts


I wrote an AutoIT program that asks the user to enter a session name. This session name is now stored in a variable within a function. What I would like to do is to now use a RUN command and set certain parameters for GHOST to process. One of the parameters is a GHOST session name (so it can connect to a ImageCast server).

My question is: How can I dump the value of this variable in the command line as a parameter for GHOST?

Here is the line that I want to run from my AutoIT script:

Run("ghost32 -crcignore -fro -clone,mode=restore,src=@mc%$download_name%,dst=1 -sure", "x:\I386\system32", "")

Those parameters for GHOST are correct. But the part where I need to dump the value (the ImageCast session name which the user enters when prompted by my script) of my variable ($download_name) I do not know how to do.

Any suggestions? If this is not possible, is there another way in which I can automate this?

Thank you.

Share this post

Link to post
Share on other sites

Correct syntax is:

Run("ghost32 -crcignore -fro -clone,mode=restore,src=@mc%" & $download_name & "%,dst=1 -sure", "x:\I386\system32", "")

( Kind of a long post for such a easy question. )

Thank you. I got it working now. I think I did not put the % in the above expression and hence it did not work.

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  

  • Create New...