Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 24th, 2003, 09:21 PM
stumildren stumildren is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: melbourne australia
Posts: 54 stumildren User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
OPen program from browser

Hi, I'm trying to find some code that will open a clients program from a link on a web page. This is corporate intranet so nothing dodgy.
Bassically the user clicks on a link and Acrobat opens on their machine and Acrobat then opens a document on the intranet file system.

I found something that looked like I was on the right track:

<script language="vbscript">
Set WShell = CreateObject("WScript.Shell")
WShell.Run "c:\program.bat"
</script>

Hope someone can help me!
Thanks!
__________________
******************************************************************************
fear is the reason anything bad happens; a fearless person is less likely to live a long time

Reply With Quote
  #2  
Old June 24th, 2003, 10:34 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Just place the link to the .pdf file on the page. When the user clicks on the link, the browser plugin will automatically open acrobat in the browser and load the .pdf file into it.

Reply With Quote
  #3  
Old June 24th, 2003, 10:42 PM
stumildren stumildren is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: melbourne australia
Posts: 54 stumildren User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Thanks, I know I can link to the exe and have it open, but I would also like to set parameters as well but don't know how to do that.

browser - open acrobat - open file (network\file\location\filename.pdf)

So you can see I'm not just trying to start acrobat, I'm also trying to tell it to do a few things as soon as it starts.

I am also looking for a way to link to a program shortcut which has parameters set inside it...

Reply With Quote
  #4  
Old June 24th, 2003, 10:46 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
If you are just wanting to load the file the all you have to do is just have the link to the file on the page.
i.e.
<a href="/network/path/to/file.pdf">file.pdf</a>

and when the user clicks the link, acrobat will start up and it will load the file.pdf file in. Simple as that.

Reply With Quote
  #5  
Old June 24th, 2003, 10:51 PM
stumildren stumildren is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: melbourne australia
Posts: 54 stumildren User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Ok, forget Acrobat and assume I'm talking about an application that doesn't plug into explorer. There are ActiveX applications for purchase out there that for example let you launch an application, open a specified file, specify where the file must be saved etc etc, your sending a list or arguments to the program your opening.

(www.particlesoftware.com) is an example of such a tool.

The application we will be launching from our intranet is some kind of CAD tool and there are a few parameters that we would like to parse through to the program we launch...

Reply With Quote
  #6  
Old July 5th, 2003, 05:27 AM
DrStein's Avatar
DrStein DrStein is offline
...grows funny creatures
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Athens, Greece
Posts: 43 DrStein User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 55 m 43 sec
Reputation Power: 6
Send a message via ICQ to DrStein
Hi. I'm trying to do exactly the same thing. The code I found is like this:
shell = new ActiveXObject("WScript.Shell");
shell.run("program.exe params");

My problems are:
1. when I test it from s single html file (by double clicking it) it starts and works just fine. But when I test the same file from my apache server it fails (like refusing to start an activex object)
2. even if I make it run I want to find a way to check when it stops in order to proceed with the rest of my code.

Please if you find something let me know...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > OPen program from browser


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway