473,769 Members | 6,838 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("W script.shell")
set oexec = ws.exec("<%=ser ver.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 6794
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\script s\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*@discussion s.microsoft.com > wrote in news:D58A0EDC-
9A************* ************@mi crosoft.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("W script.shell")
set oexec = ws.exec("<%=ser ver.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"?wh y?

Thank you
"cbDevelopm ent" 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\script s\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*@discussion s.microsoft.com > wrote in news:D58A0EDC-
9A************* ************@mi crosoft.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("W script.shell")
set oexec = ws.exec("<%=ser ver.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_RO OT. 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.ex e 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*@discussion s.microsoft.com > wrote in
news:FE******** *************** ***********@mic rosoft.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"?wh y?

Thank you
"cbDevelopm ent" 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\script s\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*@discussion s.microsoft.com > wrote in
news:D58A0EDC- 9A************* ************@mi crosoft.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("W script.shell")
> set oexec = ws.exec("<%=ser ver.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
2767
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" The file being downloaded is a license file and MUST be stored with that ..lic extension. If I access this aspx page with IE, it prompts me if I want to open or save
3
2539
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 without using the <input type ="file" ....> control. I need the same for Download also. Without displaying the Save as dialog box. Why I am asking this is I am going to handle this with my Client side ActiveX control.
7
4915
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 clicks a button for exporting a datagrid, that the excel file is saved on the server and that it DOES NOT prompt the user to open or save. Here is the code I am using for standard export that prompts the user. Thanks all. Dim...
2
1395
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 directly and without any prompted action. pls help !! thx
2
2174
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 should be savedt o the database.I want code for this: 1) Write a file 2) Upload the same file(static one) 3) Save it to Database
16
20911
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 : <%@language="vbscript" %>
1
6353
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 it is asking user to open/save the file. My code for .asp page is : <%@language="vbscript" %>
3
3287
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" value="Print directly"> <input onclick="document.all.WebBrowser.ExecWB(6,2)" type="button" value="Print directly">
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10222
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10050
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9999
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9866
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8876
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...

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.