Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Using ASP to open Aplication/File
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Using ASP to open Aplication/File

 Post Reply Post Reply Page  12>
Author
wwwscripts View Drop Down
Newbie
Newbie
Avatar

Joined: 09 May 2003
Location: United States
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote wwwscripts Quote  Post ReplyReply Direct Link To This Post Topic: Using ASP to open Aplication/File
    Posted: 01 June 2003 at 7:52pm

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

Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
wwwscripts View Drop Down
Newbie
Newbie
Avatar

Joined: 09 May 2003
Location: United States
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote wwwscripts Quote  Post ReplyReply Direct Link To This Post 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".

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
wwwscripts View Drop Down
Newbie
Newbie
Avatar

Joined: 09 May 2003
Location: United States
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote wwwscripts Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
wwwscripts View Drop Down
Newbie
Newbie
Avatar

Joined: 09 May 2003
Location: United States
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote wwwscripts Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2003 at 8:22am
I don't know if it is possible, but can you use Javascript to do this.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.