Marcelo Gazzola
Marcelo Gazzola

Reputation: 1083

How do I pass double quotes on the parameter string in Inno Setup?

I am trying to execute the following command in Inno Setup:

move "MyFolder\Extra\Tesseract-OCR" "MyDestFolder"

I tried using:

Filename: "{cmd}"; Parameters: 'move ' + "MyFolder\Extra\Tesseract-OCR" + ' ' + "MyDestFolder"';

and

Filename: "{cmd}"; Parameters: 'move ' + AddQuotes(MyFolder\Extra\Tesseract-OCR) + ' ' + AddQuotes(MyDestFolder)';

But none of them worked.

Which approach should I follow?

Upvotes: 1

Views: 602

Answers (1)

Bill_Stewart
Bill_Stewart

Reputation: 24585

Quotes can be embedded; just double them. Also, if you intend to use the cmd.exe move command, you would need the /c parameter. You might also consider using /y or as a parameter for the move command (depending on your needs).

Filename: "{cmd}"; Parameters: "/c move /y ""MyFolder\Extra\Tesseract-OCR"" ""MyDestFolder"""

/y would overwrite the file if it exists.

Upvotes: 2

Related Questions