469,945 Members | 1,363 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,945 developers. It's quick & easy.

open vbs file without prompting File Download message

kim
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.

Dec 8 '05 #1
3 6518
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?= <ki*@discussions.microsoft.com> wrote in news:D58A0EDC-
9A*************************@microsoft.com:
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.


Dec 12 '05 #2
kim
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?= <ki*@discussions.microsoft.com> wrote in news:D58A0EDC-
9A*************************@microsoft.com:
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.


Dec 14 '05 #3
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?= <ki*@discussions.microsoft.com> wrote in
news:FE**********************************@microsof t.com:
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?= <ki*@discussions.microsoft.com> wrote in
news:D58A0EDC- 9A*************************@microsoft.com:
> 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.
>
>



Dec 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Nate Hekman | last post: by
3 posts views Thread by =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.