Command working in cmd prompt, but not in batch file -


I'm trying to run this command:

  mshta Javascript: alerts (" Thanks for taking a look at my question! D;); Close ();   

This runs fine in CMD prompt, but when a batch is placed in the file, The error is found:

  close () was unexpected at this time. In the batch script, the semi-colon is ending the MSTA command, instead of    

The HTA command like you want it to be quoted to the HTA command, or to provide a script on mshta.exe.

I think this should work :

  mshta "javascript: alert ('Thanks for taking a look at my question !: D'); Close (); "   

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -