Jump to content

Recommended Posts

Windows 10
Windows 7
AutoIT v3.3.14.2

I'm trying to compile a script that contains a run command with multiple quotes, but can't get it to run properly. However, even though it doesn't run successfully, I'm not seeing any error messages during compilation or execution. Here's what it looks like...

Local $Program = Run(@ComSpec & ' /C SchTasks /Create /XML "%~DP0SetDefaultPDFReader.xml" /TN "\SetDefaultPDFReader" /RU "<domain\user>" /RP "<password>"',"",@SW_HIDE)

I must have the quotes wrong, but I've tried every combination of single/double I could think of.

Any suggestions?


Link to post
Share on other sites
  • Moderators

If you do something like this:

ConsoleWrite(' /C SchTasks /Create /XML "%~DP0SetDefaultPDFReader.xml" /TN "\SetDefaultPDFReader" /RU "<domain\user>" /RP "<password>"' & @CRLF)

Does the output look like what you would type into the CMD window?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...