A <process> element submits a STAF PROCESS START request to run the 
specified command (in this case an MSI installer in silent mode) and does 
not complete until the command it is running completes and returns an exit 
code which is then made available to you via the RC variable in your STAX 
job.  The MSI installer probably returns 0 to indicate the install was 
successful and non-zero if it failed (you can check the documentation for 
this MSI installer to verify this). 

Note that you can also return any output that the MSI installer writes to 
stdout and stderr if you'd like as this information may be helpful if the 
installation fails.  For example, if Harmonymsi.exe /v /qb is the silent 
installer command, then you could do something like:

<process name="'Run Installer in silent mode'">
  <location>'local'</location>
  <command>'Harmonymsi.exe'</command>
  <parms>'/y /qb'</parms>
  <stderr mode="'stdout'"/>
  <returnstdout/>
</process>

<if expr="RC == 0">
  <log message="1">'MSI Installer completed successfully'</log>
  <else>
    <log message="1">'MSI Installer failed, RC: %s, STAFResult: %s, 
STAXResult:\n%s'</log>
  </else>
</if>

For more information and examples, see the STAX User's Guide in the 
section about a <process> element at 
http://staf.sourceforge.net/current/STAX/staxug.html#Header_Process.

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:   Cindy Zhu <c...@fekete.com>
To:     Sharon Lucas/Austin/IBM@IBMUS
Date:   02/11/2011 10:21 AM
Subject:        RE: [staf-users] Didn't start the right VM snapshot



Hi Sharon,
 
Thank you for your help. I have one more question here:
 
I have couple lines of xml in a STAX job to run a msi installer in silent 
mode:
<process name="'Run Installer in silent mode '">
            <location>'local'</location>
            <command>'Harmonymsi.exe /v" /qb"' </command>
</process>
 
How do I know if the install in finished? check the return code? or check 
if Harmony.exe (created after install is done) exist? How the return code 
works?
 
Thank you very much.
 
Cindy
 
 
 
From: Sharon Lucas [mailto:luc...@us.ibm.com] 
Sent: February-09-11 4:40 PM
To: Cindy Zhu
Cc: staf-users@lists.sourceforge.net
Subject: RE: [staf-users] Didn't start the right VM snapshot
 
You should specify double quotes around the image and imagename variable 
values in <parms> in your STAX job to have double quotes around the image 
and imagename variable values in case they have spaces, etc. 

<script> 
image=' E:\vmw1693-w72\vmw1693-w72.vmx' 
imagename='SilkTest and STAF' 
</script> 
<process> 
<location>'local'</location> 
<command>vmruncmd</command> 
<parms>'-T ws revertToSnapshot "%s" "%s"' % (image, imagename)</parms> 
</process> 

Let me know if that resolves the problem, 

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:        Cindy Zhu <c...@fekete.com> 
To:        Sharon Lucas/Austin/IBM@IBMUS 
Date:        02/09/2011 04:56 PM 
Subject:        RE: [staf-users] Didn't start the right VM snapshot 




Thank you very much. 
  
I want the STAX job runs the following command: 
vmrun -T ws revertToSnapshot "E:\vmw1693-w72\vmw1693-w72.vmx" "SilkTest 
and STAF" 
  
I have something like this in STAX job 
<script> 
image=' E:\vmw1693-w72\vmw1693-w72.vmx' 
imagename="SilkTest and STAF" 
</script> 
<process> 
<location>'local'</location> 
<command>vmruncmd</command> 
<parms>'-T ws revertToSnapshot %s %s' % (image, imagename)</parms> 
</process> 
  
It didn't revert to the snapshot. It seems the space in variable imagename 
caused the problem. It was fine when I ran the command line with quotation 
mark. 
  
Can you help? 
  
Thanks, 
  
Cindy 
  
From: Sharon Lucas [mailto:luc...@us.ibm.com] 
Sent: February-09-11 12:23 PM
To: Cindy Zhu
Cc: staf-users@lists.sourceforge.net
Subject: Re: [staf-users] Didn't start the right VM snapshot 
  
Your STAX job is running the following command on machine 10,0,7.196 to 
start a VMware snapshot: 

"C:\Program Files (x86)\Vmware\VMware Workstation\vmware.exe" -x -q 
E:\vmw1693-w72\vmw1693-w72.vmx 

If this isn't starting the snapshot you wanted, then my guess is that you 
are not specifying the correct snapshot.  You should check the 
documentation for vmware.exe to see if that helps you determine what's 
wrong with the vmware.exe command that you are running.  Note that you can 
run the vmware.exe command manually via the command line (e.g. without 
using STAF) to check if the vmware.exe command does what you want it to 
do.

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:        Cindy Zhu <c...@fekete.com> 
To:        "staf-users@lists.sourceforge.net" 
<staf-users@lists.sourceforge.net> 
Date:        02/09/2011 12:57 PM 
Subject:        [staf-users] Didn't start the right VM snapshot 
 





Hi, 
 
I am new to STAFF. 
 
Attached is the code copied from FAQ link 
http://staf.sourceforge.net/current/STAFFAQ.htm. 
 
In the xml code, the snapshot(image) is called  "SilkTest and STAF", but 
the code didn't start the right snapshot. It always start the latest 
snapshot. 
 
Can you help me to solve this? 
 
Thanks, 
 
Cindy 
[attachment "StartVMTry.xml" deleted by Sharon Lucas/Austin/IBM] 
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users 
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to