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
Post a Comment