| Author |
Topic Search Topic Options
|
wwwscripts
Newbie
Joined: 09 May 2003
Location: United States
Status: Offline
Points: 11
|
Post Options
Thanks(0)
Quote Reply
Topic: Using ASP to open Aplication/File Posted: 01 June 2003 at 7:52pm |
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
|
 |
fernan82
Mod Builder Group
Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
michael
Senior Member
Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
|
Post Options
Thanks(0)
Quote Reply
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.
|
|
|
 |
wwwscripts
Newbie
Joined: 09 May 2003
Location: United States
Status: Offline
Points: 11
|
Post Options
Thanks(0)
Quote Reply
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".
|
 |
michael
Senior Member
Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
|
Post Options
Thanks(0)
Quote Reply
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
|
|
|
 |
wwwscripts
Newbie
Joined: 09 May 2003
Location: United States
Status: Offline
Points: 11
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
michael
Senior Member
Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
|
Post Options
Thanks(0)
Quote Reply
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.
|
|
|
 |
wwwscripts
Newbie
Joined: 09 May 2003
Location: United States
Status: Offline
Points: 11
|
Post Options
Thanks(0)
Quote Reply
Posted: 03 June 2003 at 8:22am |
|
I don't know if it is possible, but can you use Javascript to do this.
|
 |