Print Page | Close Window

Using ASP to open Aplication/File

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3196
Printed Date: 29 March 2026 at 3:41pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Using ASP to open Aplication/File
Posted By: wwwscripts
Subject: Using ASP to open Aplication/File
Date Posted: 01 June 2003 at 7:52pm

http://www.aspmessageboard.com/forum/printMessage.asp?M=590996&T=590996&F=21&P=1">View a printable version of this message! I want to know if an application can be opened using ASP.

Lets say, my wordpad.exe is located in the following path:
C:\Accessories\wordpad.exe

and my sample.rtf is located in the following path:
c:\sample.rtf

How can I use ASP to open wordpad.exe and have it open sample.rtf.

If I do changes I should be able to save it right there..

Please assist... Thanks....

Shrini




Replies:
Posted By: fernan82
Date Posted: 01 June 2003 at 8:38pm
i thought that printable version icon on your post was a new feature on the forum, i was wondering why the printable version had a header and info about another forum 

-------------
FeRnAN
http://www.danasoft.com/">


Posted By: michael
Date Posted: 02 June 2003 at 3:48pm
You can easily open wordpad or so using wsh
<%
dim wsh
set wsh = createobject("WScript.Shell")
wsh.run("%windir%\wordpad.exe")    'or wherever it is
%>
Then I am sure there is a method to open the rtf file, something like wsh.open("......./bla.rtf") but I am not sure about the syntax, you can look that up on MSDN. Make sure that you terminate this otherwise it stays in server memory.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: wwwscripts
Date Posted: 02 June 2003 at 5:51pm

I looked thorugh MSDN and found some information. Just to run the above script, I getting the following error. Even if I put the full path...

When I try to run that I get a file not found error "0x80070002".



-------------
Welcome to the New world


Posted By: michael
Date Posted: 02 June 2003 at 7:31pm
On second though, this might not be the best way .... do a search on google, there may be better ways, thus using WSH

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: wwwscripts
Date Posted: 02 June 2003 at 8:32pm
I am sorry Michael... I don't have much knowledge of ASP. I am trying a simple way to to open wordpad and open a file, and windows scripting sounds like a easy way to do this.. Is there another way out there, without any components.

-------------
Welcome to the New world


Posted By: michael
Date Posted: 03 June 2003 at 8:12am

A lot of hosts do not let you use WSH as you can damage the server if it is not secured enough. But if you put a link to an rtf file it should automatically open in the rtf registered application or you can force the user to download it first.



-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: wwwscripts
Date Posted: 03 June 2003 at 8:22am
I don't know if it is possible, but can you use Javascript to do this.

-------------
Welcome to the New world


Posted By: wwwscripts
Date Posted: 03 June 2003 at 12:56pm
I got it going.. but the problem is (Very Dangerous) I have to change the Active X controls in my Internet Settings for the Internet to enable. Is there any way to make it Intranet Settings...

-------------
Welcome to the New world



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net