www.webdeveloper.com
Results 1 to 5 of 5

Thread: Error for Special char in a string

  1. #1
    Join Date
    Apr 2007
    Location
    Italy
    Posts
    104

    Error for Special char in a string

    Hi,

    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 triedto use this way but with no result:
    Wshell.Run("""d:\Program Files\taskkill """& chr(47) &"""IM calc.exe""")

    Thanks in advance !!!
    Last edited by il_betto; 02-09-2011 at 04:30 AM.

  2. #2
    Join Date
    Apr 2007
    Location
    Italy
    Posts
    104
    Sorry, no idea

  3. #3
    Join Date
    Jan 2003
    Location
    Dundee, Scotland
    Posts
    1,367
    Hi,

    I think you need to use the WScript.Arguments object. Here is an article I found:

    http://itknowledgeexchange.techtarge...uments-object/

    Hope that helps.

    regards

    Ribs
    ----------------------------------

  4. #4
    Join Date
    Apr 2007
    Location
    Italy
    Posts
    104
    Thanks for the help,

    I' ve read the article but up to now I am not able to solve it ...

  5. #5
    Join Date
    Apr 2007
    Location
    Italy
    Posts
    104
    I have solved the problem with the help of my friend ...

    There were two mistakes:

    1. It must be set to LOW the level of PROTECTION of the IIS in which there is the webserver intranet

    2. it was a bad path of taskkill; under, there is the correct path:

    <&#37;@ Language=VBScript %>
    <%
    Option Explicit
    Dim shell
    Set shell = Server.CreateObject("WScript.Shell")
    shell.Run "c:\windows\system32\taskkill /IM calc.exe" <-- OK !!
    Set shell = Nothing
    %>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles