473,399 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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 6764
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Nate Hekman | last post by:
I have an aspx page that generates a file on the fly for a person to download. It sends these http headers: Content-Type: text/plain Content-Disposition: attachment; filename="myfile.lic" ...
3
by: Sarav | last post by:
Hi All, I need to upload an XML file via an client side ActiveX control. I searched the web but everywhere got the samples of using file control alone. How can I upload a file into my web server...
7
by: mattmerc | last post by:
Hi all, We have all seen lot of method for exporting datagrids to Excel. I have a slightly different need. I think it should be easy to accomplish but I am not sure how. I would like when a user...
2
by: Torres | last post by:
Dear all, I use this "HyperLink1.NavigateUrl = "\\aoui\myeoe\testing.bat" to run the batch file. The windows will show a messagebox "RUN" "SAVE" OR "CANCEL". I want to run the batch file...
2
by: rinkudhimar | last post by:
I want to write using fwrite and upload the file without using File Field or Browse option. Actually I want to upload static file after writing it useing fwrite and as soon as it gets uploaded it...
16
AnuSumesh
by: AnuSumesh | last post by:
Hi, I am ridirecting page to vbs file. File is running properly but it is asking user to open/save the file. But i want that it should run without any dialouge box. My code is : ...
1
AnuSumesh
by: AnuSumesh | last post by:
Hi, I am redirecting from asp page to vbs file.The VBS script resides on same folder as of asp pages in my windows/IIS server. I am using windows2003 and IIS 6.0. Script is running properly but...
3
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I have a asp.net page, it uses js to print in IE. It always has the prompting user window appear. I have tried: <input onclick="document.all.WebBrowser.ExecWB(6,6)" type="button"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.