View Single Post
  #1 (permalink)  
Old February 10th, 2011, 05:10 AM
il_betto il_betto is offline
Authorized User
Join Date: Sep 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default Error for Special char in a string


I have a problem to pass the character "/" in a string.

I have to use this command line:
taskkill /IM calc.exe

And I receive an error because the webpage with IIS cannot recognize the special character "/"

Set Wshell = Server.CreateObject("WScript.Shell")
Wshell.Run("""d:\Program Files\taskkill /IM calc.exe""") <--- NO GOOD !!!
Set Wshell = Nothing

I have tried to use this way but with no result:
Wshell.Run("""d:\Program Files\taskkill """& chr(47) &"""IM calc.exe""")
Thanks in advance !!!
Reply With Quote