Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute a program client side

Status
Not open for further replies.

ukwebsite

Programmer
Dec 9, 2000
82
0
0
GB

Please help.

How do I execute a program client side?

E.g. On our intranet i want to put links to open programs instead of shortcuts on the desktops of the PC's.

Thank you in advance.

Matthew Wilde Matthew Wilde
matthew@ukwebsite.com
 
Client side scripting:

Maybe you should take a look at the VBScript or Javascript Forums

IE:
<script language=&quot;VBScript&quot;>
'Code to execute local program
</Script>
 
For example Microsoft Word.

Matthew Wilde
matthew@ukwebsite.com
 
If is office product, you can change the MIME header for the output, for example:

Response.ContentType = &quot;application/vnd.ms-excel&quot;

otherwise, you actually can't execute any program at client side.
------------------
Freedom is a Right
 
What about something to do with WSH or a third party product? Matthew Wilde
matthew@ukwebsite.com
 
sjravee is right, is a major security hazard when you execute progrmas (not pass the documents from the server to the client like the example of goatstudio) but if you really need to do it, by default IIS doesn't allow you to execute an Application. You have to fix a key in the registry to do it. At least in IIS4
 
So what is WHS? Does this run the programs on the server? Matthew Wilde
matthew@ukwebsite.com
 

Basically when you logon to your PC I want Internet Explorer be in the startup group and open the companys intranet. On the default page of the intrnet will be shortcuts instead of on the desktop to open our users programs. E.g. shortcuts to all the office apps - when a user click on say Word - word will open. Matthew Wilde
matthew@ukwebsite.com
 
You could use Automation to do this although it requires ActiveX controls so will not work with Netscape. I have a site with links to word,excel,powerpoint documents that open the documents in the clients copy of word/excel/powerpoint.

The client browser needs to be configured to allow scripting of ActiveX controls. If it's for an Intranet then you have a degree of control over your audience so you could create a setup file (as we did) to modify the registry to allow these ActiveX controls to be run from the client.

Let me know if you want any more info on how we dd this

regards

Tony Tony
 

Yes how do you do this? Do you have any sample code?

I would greatly appreciate your help.

Thanks
Matthew Matthew Wilde
matthew@ukwebsite.com
 
Just my 2c ..

GIven that office apps generally reside in the same spots on computers (program files/microsoft office/office or some such), why not make links like
<a href=&quot;c:\program files\microsoft office\office\winword.exe&quot;>Open M$ Word</a> codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
<insert witticism here>
 
How about providing a link to a blank word document, which will automatically open word - <a href=&quot;new.doc&quot;>Word</a> ?

HTH
Beck

 
the following HTML VBScript should work:

<html>
<head></head>
<body bgcolor=&quot;#FFFFFF&quot; topmargin=&quot;1&quot; leftmargin=&quot;3&quot; onunload=&quot;killAll()&quot;>
<script language=vbscript>
dim ex
dim wd
dim ppt
sub launchExcel()
set ex = createobject(&quot;Excel.application&quot;)
ex.visible= true
end sub


sub launchWord()
set wd = createobject(&quot;Word.application&quot;)
wd.visible= true
end sub


sub launchPPT()
set ppt = createobject(&quot;PowerPoint.application&quot;)
ppt.visible= true
end sub


sub killAll()
on error resume next
set ex=nothing
wd.quit
set wd=nothing
ppt.quit
set ppt=nothing

end sub
</script>
<a href=&quot;#&quot; onclick=&quot;launchExcel(); return false&quot;>Excel</a><br>
<a href=&quot;#&quot; onclick=&quot;launchWord(); return false&quot;>word</a><br>
<a href=&quot;#&quot; onclick=&quot;launchPPT(); return false&quot;>PPT</a><br>

</body>
</html>
 
Anyone got anymore ideas then?

sjravee when running the script you gave above i get an error.

ActiveX component can't create object: &quot;Word.Application&quot; Matthew Wilde
matthew@ukwebsite.com
 
Your browser will need to be configured to allow scripts to run that are not marked safe for scripting.

Or you can update the registry to allow Word/Excel/Powerpoint automation by adding the following keys:

Word.Application
HKEY_CLASSES_ROOT\CLSID\{000209FF-0000-0000-C000-000000000046}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}
HKEY_CLASSES_ROOT\CLSID\{000209FF-0000-0000-C000-000000000046}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}

Excel.Application
HKEY_CLASSES_ROOT\CLSID\{00024500-0000-0000-C000-000000000046}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}
HKEY_CLASSES_ROOT\CLSID\{00024500-0000-0000-C000-000000000046}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}

PowerPoint.Application
HKEY_CLASSES_ROOT\CLSID\{91493441-5A91-11CF-8700-00AA0060263B}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}
HKEY_CLASSES_ROOT\CLSID\{91493441-5A91-11CF-8700-00AA0060263B}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4} Tony
 
Yeah, it should work as long as you have word installed on your pc, you may need to do a full install of office for the automation to work, im not 100% sure about that though
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top