How to execute a .cmd file from the classic asp(javascript)?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dinesh1440
    New Member
    • May 2010
    • 16

    How to execute a .cmd file from the classic asp(javascript)?

    I want to execute a .cmd file from the UI.

    I tried the following code. But it is not working. It just passes that line giving no error nor executing.

    Code:
    var wshell =  Server.CreateObject("WScript.Shell") ;
    
    wshell.Run("D:\\inetpub\\wwwroot\\accenture\\core\\maintenance\\commandline\\mail\\RepeatMacroProcessingTask.cmd");
             wshell=null;
    Did I miss anything?
    How else could it be done?

    Thanks,
    Dinesh M
    Last edited by Frinavale; Mar 15 '12, 07:52 PM.
Working...