open vbs file without prompting File Download message

Discussion in 'ASP .Net' started by =?Utf-8?B?a2lt?=, Dec 8, 2005.

  1. GOOD morning,

    I try to open xx.vbs in <href="./xx.vbs"></hef> but it pop up the file
    download mesage. How can i disabled it?

    I try another solution like this :
    set ws = createobject("Wscript.shell")
    set oexec = ws.exec("<%=server.mapPath(./xx.vbs)%>")
    But it give error "the path/xx.vbs is not a valid win32 application"
    May i know why? I think some setting in registry will open the vbs file
    without error or prompting. Kindly advice.
     
    =?Utf-8?B?a2lt?=, Dec 8, 2005
    #1
    1. Advertising

  2. You are asking a user to automatically execute a VBS file when they click
    a link on a web page? I would assume this is a safe, controlled
    environment, but the security risks to enable such a feature would not
    make it realistic.

    The client would need a MIME type configured for the VBS extension that
    would automatically launch the file using WSCRIPT (or CSCRIPT).

    Your second solution is telling the client to execute a file in the
    location the file is stored on the server. e.g. The server has the VBS
    file in d:\Web\scripts\xx.vbs. The client hits the page and is told to
    run "d:\webs\scripts\xx.vbs" The client doesn't even have a D Drive.
    The path is meaningless to the client.

    --
    ----
    700cb Development, Inc.
    http://www.700cb.net
    ..NET utilities, developer tools,
    and enterprise solutions

    =?Utf-8?B?a2lt?= <> wrote in news:D58A0EDC-
    :

    > GOOD morning,
    >
    > I try to open xx.vbs in <href="./xx.vbs"></hef> but it pop up the file
    > download mesage. How can i disabled it?
    >
    > I try another solution like this :
    > set ws = createobject("Wscript.shell")
    > set oexec = ws.exec("<%=server.mapPath(./xx.vbs)%>")
    > But it give error "the path/xx.vbs is not a valid win32 application"
    > May i know why? I think some setting in registry will open the vbs file
    > without error or prompting. Kindly advice.
    >
    >
     
    cbDevelopment, Dec 12, 2005
    #2
    1. Advertising

  3. Firstly thank you for the reply.
    May i know how can i set the MIME type configured in VBS?

    i had copy the file into client local path which is in c:\temp\xxx.vbs. but
    it still give me this error "is not a valid win32 application"?why?

    Thank you
    "cbDevelopment" wrote:

    > You are asking a user to automatically execute a VBS file when they click
    > a link on a web page? I would assume this is a safe, controlled
    > environment, but the security risks to enable such a feature would not
    > make it realistic.
    >
    > The client would need a MIME type configured for the VBS extension that
    > would automatically launch the file using WSCRIPT (or CSCRIPT).
    >
    > Your second solution is telling the client to execute a file in the
    > location the file is stored on the server. e.g. The server has the VBS
    > file in d:\Web\scripts\xx.vbs. The client hits the page and is told to
    > run "d:\webs\scripts\xx.vbs" The client doesn't even have a D Drive.
    > The path is meaningless to the client.
    >
    > --
    > ----
    > 700cb Development, Inc.
    > http://www.700cb.net
    > ..NET utilities, developer tools,
    > and enterprise solutions
    >
    > =?Utf-8?B?a2lt?= <> wrote in news:D58A0EDC-
    > :
    >
    > > GOOD morning,
    > >
    > > I try to open xx.vbs in <href="./xx.vbs"></hef> but it pop up the file
    > > download mesage. How can i disabled it?
    > >
    > > I try another solution like this :
    > > set ws = createobject("Wscript.shell")
    > > set oexec = ws.exec("<%=server.mapPath(./xx.vbs)%>")
    > > But it give error "the path/xx.vbs is not a valid win32 application"
    > > May i know why? I think some setting in registry will open the vbs file
    > > without error or prompting. Kindly advice.
    > >
    > >

    >
    >
    >
    >
     
    =?Utf-8?B?a2lt?=, Dec 14, 2005
    #3
  4. The MIME types (or Content Types) for Windows are in a series of registry
    entries in HKEY_CLASSES_ROOT. Some browsers like Netscape and Opera allow
    additional MIME types to be configured for their use.

    Try executing the script using the script host, as in: "wscript.exe c:\temp
    \xxx.vbs" or "cscript c:\temp\xxx.vbs" No guarantees that it will work.
    At best you will get a security warning asking if you want to Open or Save
    the file.

    --
    ----
    700cb Development, Inc.
    http://www.700cb.net
    ..NET utilities, developer tools,
    and enterprise solutions

    =?Utf-8?B?a2lt?= <> wrote in
    news::

    > Firstly thank you for the reply.
    > May i know how can i set the MIME type configured in VBS?
    >
    > i had copy the file into client local path which is in
    > c:\temp\xxx.vbs. but it still give me this error "is not a valid win32
    > application"?why?
    >
    > Thank you
    > "cbDevelopment" wrote:
    >
    >> You are asking a user to automatically execute a VBS file when they
    >> click a link on a web page? I would assume this is a safe,
    >> controlled environment, but the security risks to enable such a
    >> feature would not make it realistic.
    >>
    >> The client would need a MIME type configured for the VBS extension
    >> that would automatically launch the file using WSCRIPT (or CSCRIPT).
    >>
    >> Your second solution is telling the client to execute a file in the
    >> location the file is stored on the server. e.g. The server has the
    >> VBS file in d:\Web\scripts\xx.vbs. The client hits the page and is
    >> told to run "d:\webs\scripts\xx.vbs" The client doesn't even have a
    >> D Drive. The path is meaningless to the client.
    >>
    >> --
    >> ----
    >> 700cb Development, Inc.
    >> http://www.700cb.net
    >> ..NET utilities, developer tools,
    >> and enterprise solutions
    >>
    >> =?Utf-8?B?a2lt?= <> wrote in
    >> news:D58A0EDC- :
    >>
    >> > GOOD morning,
    >> >
    >> > I try to open xx.vbs in <href="./xx.vbs"></hef> but it pop up the
    >> > file download mesage. How can i disabled it?
    >> >
    >> > I try another solution like this :
    >> > set ws = createobject("Wscript.shell")
    >> > set oexec = ws.exec("<%=server.mapPath(./xx.vbs)%>")
    >> > But it give error "the path/xx.vbs is not a valid win32
    >> > application" May i know why? I think some setting in registry will
    >> > open the vbs file without error or prompting. Kindly advice.
    >> >
    >> >

    >>
    >>
    >>
    >>

    >
     
    cbDevelopment, Dec 15, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carlos

    authenticating without prompting

    Carlos, Sep 21, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    497
    Bruce Barker
    Sep 22, 2005
  2. Replies:
    7
    Views:
    1,708
    Shunya
    Mar 1, 2006
  3. Douglas Dillon

    Prompting user for download in Servlet

    Douglas Dillon, Apr 1, 2005, in forum: Java
    Replies:
    2
    Views:
    569
    marcus
    Apr 2, 2005
  4. Billy Zhang

    Print directly in IE without prompting user

    Billy Zhang, Aug 5, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    932
    Steven Cheng [MSFT]
    Aug 6, 2008
  5. Andrew Henry

    Prompting a download of an external file in ASP.

    Andrew Henry, Jul 20, 2005, in forum: ASP General
    Replies:
    3
    Views:
    199
    Bullschmidt
    Jul 21, 2005
Loading...

Share This Page