The World Simplified is a Virtual World

The Adventures of Justin Zarb and Dave Falkus in the Virtual Jungle

<SCRIPTBODY> Examples

<SCRIPTBODY> Examples

  • Comments 2
  • Likes

Example 1 - ABORTRESULT and SUCCESSRESULT

If ABORTRESULT is specified, the client will check the script's exit code when it completes. If SUCCESSRESULT is specified (and if ABORTRESULT is not or it does not match the script's exit code), the client will check the script's exit code to see if it matches the value in SUCCESSRESULT.

<DEPENDENCY> <SCRIPT TIMING="PRE" EVENT="LAUNCH" PROTECT="TRUE" WAIT="TRUE" TIMEOUT="10" SUCCESSRESULT="1" ABORTRESULT="0"> 
<SCRIPTBODY>@ if not %COMPUTERNAME% == "SpecialComputer" exit 1 @ exit 0 
</SCRIPTBODY> 
</SCRIPT> 
</DEPENDENCY>


A more detailed explanation of these commands can be found at:

http://support.microsoft.com/kb/930973/en-us

 

Example 2 - Pre-Launching Command Prompt

<DEPENDENCY>
<SCRIPT TIMING="PRE" EVENT="LAUNCH" WAIT="TRUE" PROTECT="TRUE">
<SCRIPTBODY>cmd.exe</SCRIPTBODY>
</SCRIPT>
</DEPENDENCY> 

 

Example 3 - Embedding Batch File Commands within OSD File

<DEPENDENCY>
<SCRIPT EVENT="LAUNCH" TIMING="PRE" PROTECT="TRUE" WAIT="TRUE">
<SCRIPTBODY>
net use k: \\\\w2k-pdc\\netlogon\n
CALL k:\\usr-w2k.cmd\n
\\\\sfc-softgrid\\shr\editini.exe c:\\word\\word.ini "File Locations" TempPath c:\\temp\n
</SCRIPTBODY>
</SCRIPT>
</DEPENDENCY>

 

Example 4 - Pre-Launching EXE from within the Sequence

<DEPENDENCY>
<SCRIPT TIMING="PRE" EVENT="LAUNCH" WAIT="TRUE" PROTECT="TRUE">
<SCRIPTBODY>%SFT_MNT%\\OfficeXP\\Office10\\proflwiz.exe</SCRIPTBODY>
</SCRIPT>
</DEPENDENCY> 

 

Example 5 - Pre-Launching a Data File (e.g. AVI file) from within the Sequence

<DEPENDENCY>
<SCRIPT TIMING="PRE" EVENT="LAUNCH" WAIT="TRUE" PROTECT="TRUE">
<SCRIPTBODY>%SFT_MNT%\\App\\Data\\Sequencing.avi</SCRIPTBODY>
</SCRIPT>
</DEPENDENCY> 

NOTE: In this example, the sequencing.avi launches the locally installed Media Player.

 

NOTE: A data file (e.g. sequencing.avi) cannot be specified within the FILENAME entry of the CODEBASE tag as shown below.

<CODEBASE
FILENAME="App\Data\Sequencing.avi"
SYSGUARDFILE="App\osguard.cp"
HREF="rtsp://softgrid:554/app.sft"
GUID="A2A6D95E-8898-41C0-8020-797B23A1E917"
SIZE="33363442"/>

 

Example 6 - Pre-Launching a Control Panel Applet within the Sequence

<DEPENDENCY>
<SCRIPT TIMING="PRE" EVENT="LAUNCH" WAIT="TRUE" PROTECT="TRUE">
<SCRIPTBODY>%SFT_MNT%\\App\\CPL\\SYSDM.CPL</SCRIPTBODY>
</SCRIPT>
</DEPENDENCY> 

 

Example 6a - Pre-Launching a Control Panel Applet within the Sequence

<DEPENDENCY>
<SCRIPT TIMING="PRE" EVENT="LAUNCH" WAIT="TRUE" PROTECT="TRUE">
<SCRIPTBODY>
"C:\\Program Files\\Common Files\\System\\Mapi\\1033\\mlcfg32.cpl"
</SCRIPTBODY>
</SCRIPT>
</DEPENDENCY>

Feel Free to add your SCRIPTBODY examples that you may have done to the comments below. Would like to get a nice set for you all to refer to in the future!

Comments
  • Justin Zarb has posted a blog entry with some sample examples of scriptbody blocks for OSD files. Nothing earth shattering there, but additional examples are always nice to have. ...

  • Hi, I am trying to do imbedded commands within the scripbody but I also want to do an if statement.

    I have so far done multiple variations with the following my latest attempt.  This also does not work.  Have you any sugestions?

    <SCRIPTBODY>if not exist "C:\\Support\\AppVKit\\Offvirt.msi" COPY "\\\\dmbcbcsvr1\\Software\\AppV_46SP1\\AppVKit" "C:\\Support\\AppVKit" start /wait msiexec /i "C:\\Support\\AppVKit\\Offvirt.msi" /L*V "C:\\Support\\AppVKit\\LOG.LOG" PROPLUS=1 PROJECTPRO=1 PIDKEYS=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx VISIOPREM=1 PIDKEYS=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx USEROPERATIONS=1

      </SCRIPTBODY>

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment