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) -

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -