English Deutsch Français Italiano Particle Software Buy Now


Particle Software
 
Multiple Exection
   ..::   About  •  Purchasing  •  Search  •  Contact  • Home   ::..
 
Screenshots
• Sample
Downloads
Resources
• FAQ
• Macros

 
   There are several ways to run multiple programs using IntraLaunch. You can have a single HTML link run one or more programs, or use a single IntraLaunch object to execute many programs - there is a different. The following examples demonstrate the possibilities.


  You can execute a second application only after a first one closes using the "Delay" parameter. The example below shows an object that will run Word, then Excel after and only after Word closes. This example logs activity to a run.log in the workstations Windows directory and also will bring Excel to the foreground if its already running. If Word fails to run the message box will show the error message "Could not run Word" and IntraLaunch will not attempt to execute the second application. To execute the second application even if the first one fails use the "WaitContinue" option for Delay instead of just "Wait".


 
 
<HTML>
<BODY>

(Common HTML Web Page)

<OBJECT ID="IntraLaunch" STYLE="display : none" WIDTH=1 HEIGHT=1    CODEBASE="http://intranet.net/menu/IntraLaunch.CAB#version=5,0,0,0"
   CLASSID="CLSID:0AE533FE-B805-4FD6-8AE1-A619FBEE7A23">
   <PARAM NAME="ImageLoc" VALUE="Remote">
   <PARAM NAME="ImageSrc" VALUE="http://server.intranet.net/apps.gif">
   <PARAM NAME="Run" VALUE="C:\Apps\Office\winword.exe">
   <PARAM NAME="RunParms" VALUE="">
   <PARAM NAME="Display" VALUE="MAX">
   <PARAM NAME="Sound" VALUE="C:\Data\sound\open.wav">
   <PARAM NAME="ProcessErr" VALUE="MessageBox">
   <PARAM NAME="ErrAction" VALUE="Error|Could not run Word.">
   <PARAM NAME="Log" VALUE="%windir%\run.log">
   <PARAM NAME="Delay" VALUE="Wait">
   <PARAM NAME="Delay_Run" VALUE="C:\Apps\Office\excel.exe">
   <PARAM NAME="Delay_RunParms" VALUE="">
   <PARAM NAME="Delay_DefDir" VALUE="">
   <PARAM NAME="Delay_Display" VALUE="MAX">
   <PARAM NAME="Delay_Sound" VALUE="C:\Data\sound\run.wav">
   <PARAM NAME="Delay_ProcessErr" VALUE="MessageBox">
   <PARAM NAME="Delay_ErrAction" VALUE="Error|Cannot run Excel.">
   <PARAM NAME="Delay_RecallApp" VALUE="XLMAIN">
   <PARAM NAME="Delay_AndRestore" VALUE="True">
</OBJECT>

(Common HTML Web Page Continued)

</BODY>
</HTML>
 
 
       

  Notes: Most macros are also supported for Delay_Run. Be aware that a some programs are stubs, such as explorer.exe. If specifying explorer.exe for "Run" IntraLaunch will execute explorer and then immediately continue on and execute the program for "Delay_Run" because explorer.exe spawns something else and quits immediately. IntraLaunch version 4.3 and higher required.



  You can also pause Javascript until a program closes with the example below. The first alert will show when starting notepad, then the second alert will only show when notepad closes. The IntraLaunch:DoNothing macro requires IntraLaunch 4.7 or higher.


 
 
<HTML>

<SCRIPT LANGUAGE="JavaScript">
  function Run()
  {
    alert ('Starting execution...');
    IntraLaunch_Pause.ExecuteIt('Null');
    alert ('Continuing execution...');
  }
</SCRIPT>

<BODY>

<a href="Javascript:Run();">Run</a>

</BODY>

<OBJECT ID="IntraLaunch_Pause" STYLE="display : none" WIDTH=1 HEIGHT=1    CODEBASE="http://intranet.net/menu/IntraLaunch.CAB#version=5,0,0,0"
   CLASSID="CLSID:0AE533FE-B805-4FD6-8AE1-A619FBEE7A23">
   <PARAM NAME="ImageLoc" VALUE="Null">
   <PARAM NAME="ImageSrc" VALUE="Null">
   <PARAM NAME="Run" VALUE="notepad">
   <PARAM NAME="RunParms" VALUE="">
   <PARAM NAME="Delay" VALUE="Wait">
   <PARAM NAME="Delay_Run" VALUE="IntraLaunch:DoNothing">
</OBJECT>

</HTML>
 
 
       



  An HTML link can also execute several programs by using a Java/VBScript function. A time delay between the different program executions can be specified with the Pause parameter. Word will run four seconds after Excel.


 
 
<HTML>

<SCRIPT LANGUAGE="JavaScript">
  function RunApps()
  {
    IntraLaunch_Excel.ExecuteIt('Null');
    IntraLaunch_Word.ExecuteIt('Null');
  }
</SCRIPT>

<BODY>

<a href="Javascript:RunApps();">Run Apps</a>

</BODY>

<OBJECT ID="IntraLaunch_Excel" STYLE="display : none" WIDTH=1 HEIGHT=1    CODEBASE="http://intranet.net/menu/IntraLaunch.CAB#version=5,0,0,0"
   CLASSID="CLSID:0AE533FE-B805-4FD6-8AE1-A619FBEE7A23">
   <PARAM NAME="ImageLoc" VALUE="Null">
   <PARAM NAME="ImageSrc" VALUE="Null">
   <PARAM NAME="Run" VALUE="C:\Apps\Office\excel.exe">
   <PARAM NAME="RunParms" VALUE="">
</OBJECT>

<OBJECT ID="IntraLaunch_Word" STYLE="display : none" WIDTH=1 HEIGHT=1    CODEBASE="http://intranet.net/menu/IntraLaunch.CAB#version=5,0,0,0"
   CLASSID="CLSID:0AE533FE-B805-4FD6-8AE1-A619FBEE7A23">
   <PARAM NAME="ImageLoc" VALUE="Null">
   <PARAM NAME="ImageSrc" VALUE="Null">
   <PARAM NAME="Run" VALUE="C:\Apps\Office\winword.exe">
   <PARAM NAME="RunParms" VALUE="">
   <PARAM NAME="Pause" VALUE="4">
</OBJECT>

</HTML>
 
 
       


   A single object can be used to run different programs by passing the program to run as a parameter. For example, the program 'notepad' with the switches /a and /b is executed below. Another HREF could just as easily execute wordpad, without the need to create another IntraLaunch object. The Run param is set to 'Null'.

 
 
<A HREF="#" LANGAUGE="VBScript" OnClick="IntraLaunch.ExecuteIt('notepad|/a /b')">Notepad</A>

<OBJECT ID="IntraLaunch" WIDTH=1 HEIGHT=1 CLASSID="CLSID:B8...
   <PARAM NAME="ImageLoc" VALUE="Null">
   <PARAM NAME="ImageSrc" VALUE="Null">
   <PARAM NAME="Run" VALUE="Null">
   <PARAM NAME="RunParms" VALUE="">
   <PARAM NAME="DefDir" VALUE="">
   <PARAM NAME="Display" VALUE="ACTIVATE">
   <PARAM NAME="ProcessErr" VALUE="MessageBox">
   <PARAM NAME="ErrAction" VALUE="Error|Sorry, not found.">
</OBJECT>
 
 
       



  If passing a full path, you might need to use two backslashes because the first one is treated as the escape character. For example IntraLaunch.ExecuteIt('%mydocuments%\\letter.doc'). Variables can also be passed to ExecuteIt and will be parsed for replacement.

  You can use this idea to create a run type dialog box right on a web page similar to the following. The program specified from the text box is passed to an IntraLaunch object similar to above with Javascript.

Run Box Example


Copyright © 1997-2012 Particle Software - All Rights Reserved
Web services provided by Extreme Hosting