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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active Desktop Opening Programs!

Status
Not open for further replies.

Tezdread

Technical User
Oct 23, 2000
468
GB
Hello all!
I am thinking of designing a small web site to use as the Active desktop, which in its self is easy enough but I really would like a hypertext link/image map, to point to, and open any of my programs, in the same way a shortcut would do. I'm not sure if it can be done, I've tried a couple of ways, and so far, it just presumes I want to download it, in the same way, I would if I clicked a link on the web that pointed to an exe file. This does give me an option to open from current location, but this is not the desired effect. Has anybody been successful in doing this? Thanks :)
 
Here is a sample of my Active Desktop. It's not perfect in that there is an ActiveX warning. Use short filenames for your .exe links (see the Outlook line). Maybe one of our fellow tek-tip members will figure out how to overcome the security problem...
Code:
<html>
<head>
<script language=&quot;javascript&quot;>
  function RunProgram(progName){
    var objWSH = new ActiveXObject(&quot;WScript.Shell&quot;);
    var retval = objWSH.Run(progName,1,false);
  }
</script>
<style type=&quot;text/css&quot;>
  H1
  {
    font-family:&quot;Verdana,Tahoma,Arial&quot;;
    color:LightSalmon;
    line-height:30px;
    margin-left:0px;
    margin-bottom:0px;
    margin-top:0px;
    text-indent:0px;
    font-weight:bold;
    font-size:20pt;
  }
  H2
  {
    font-family:&quot;Verdana,Tahoma,Arial&quot;;
    color:LightSalmon;
    line-height:20px;
    margin-left:-45px;
    margin-bottom:0px;
    margin-top:0px;
    text-indent:0px;
    font-weight:bold;
    font-size:10pt;
  }
  H3
  {
    font-family:&quot;Verdana,Tahoma,Arial&quot;;
    color:White;
    line-height:14px;
    margin-left:0px;
    margin-bottom:0px;
    margin-top:0px;
    text-indent:15px;
    font-weight:bold;
    font-size:8pt;
  }
  .out
  {
    Color:white;
  }
  .over
  {
    Color:LightSalmon;
    cursor:hand;
  }
  a:link
  {
    Color:white;
    Text-Decoration:None;
  }
  a:visited
  {
    Color:white;
    Text-Decoration:None;
  }
  a:active
  {
    Color:white;
    Text-Decoration:None;
  }
  a:hover
  {
    Color:LightSalmon;
    Text-Decoration:None;
  }

</style>
<body bgcolor=&quot;teal&quot;>
<h2>
  <ul type=&quot;disc&quot;>Web Links
  <h3>
    <li><a href=&quot;file:///::{871C5380-42A0-1069-A2EA-08002B30309D}&quot;>Internet Explorer</a></li>
    <li><a href=&quot;[URL unfurl="true"]http://www.altavista.com/cgi-bin/query?pg=q&Translate=on&RD=DESCRIPTION&RD=URL&RD=LANGUAGE&nbq=50&RD=HIGHLIGHT&prf=Submit&quot;>Search[/URL] Page (Altavista)</a></li>
  </h3>
  </ul>
</h2>
<h2>
  <ul type=&quot;disc&quot;>Local Links
  <h3>
    <li><a href=&quot;file:///::{450D8FBA-AD25-11D0-98A8-0800361B1103}&quot;>My Documents</a></li>
    <li><a href=&quot;file://C:\Extras\Download&quot;>Downloads Folder</a></li>
    <br><br>
    <li><a href=&quot;file:///::{20D04FE0-3AEA-1069-A2D8-08002B30309D}&quot;>My Computer</a></li>
    <li><a href=&quot;file:///::{992CFFA0-F557-101A-88EC-00DD010CCC48}&quot;>Network Neighborhood</a></li>
    <li><a href=&quot;file:///::{208D2C60-3AEA-1069-A2D7-08002B30309D}&quot;>My Network Places</a></li>
    <li><a href=&quot;file:///::{645FF040-5081-101B-9F08-00AA002F954E}&quot;>Recycle Bin</a></li>
    <br><br>
    <li><a href=&quot;file://A:\&quot;>Floppy Drive</a></li>
    <li><a href=&quot;file://C:\&quot;>Hard Drive</a></li>
    <li><a href=&quot;file://D:\&quot;>CD-ROM Drive</a></li>
  </h3>
  </ul>
</h2>
<h2>
  <ul type=&quot;disc&quot;>Programs
  <h3>
    <li><a href=&quot;file:///::{D20EA4E1-3957-11d2-A40B-0C5020524153}&quot;>Administrative Tools</a></li>
    <li><h3 onMouseOver=&quot;this.className='over'&quot; onMouseOut=&quot;this.className='out'&quot; onClick=&quot;RunProgram('c:\\progra~1\\Micros~2\\Office\\outlook.exe')&quot;>Outlook</h3></li>
  </h3>
  </ul>
</h2>
</html>

Hope it helps,
Rob Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
Thank you for your input Rob, I have had a play around with that, everything except the Outlook express worked, I tried to run another prog but still no joy. I never got any Active X Problems, I tried it on a in 2000 Pro machine, will have to test it on win 98 also. I see that you used the program code, or registry code? {871C5380-42A0-1069-A2EA-08002B30309D} etc. This seems to work great :) JUst have to get the program launch working. Thanks again.
 
Tezdread,

My script runs Outlook 2000 not Outlook Express. You will need to change the line to reflect your setup and e-mail program. You will then receive an ActiveX warning.

Nick,

Thanks for the idea. I had actually toyed around with this a while back but forgot about it. I can see where a virtual site with only interactive users having access could launch the process as a server side process and, with the info the article you mentioned has, shouldn't pop up a security warning. I'll probably just end up writing an ActiveX control that will allow this to run without having to use asp.

Later, Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top