Try the following (add another set of double quotes, escaped with a \,
around the path to the executable db2unins):

staf local PROCESS Start Shell Command "\"C:\Program Files\IBM
\SQLLIB_V97FP3_100805\BIN\db2unins\"" Parms "-u {STAF/DataDir}\tmp\TIAT
\Windows_db2un.rsp -y" Wait SameConsole StdErrToStdOut ReturnStdOut

Note that you also need double quotes around the PARMS value (since it
contains spaces).

For example:

C:\>STAF local PROCESS START SHELL COMMAND "\"C:\Program Files\Java
\jre1.6.0_03\
bin\java\" -version" RETURNSTDOUT STDERRTOSTDOUT WAIT
Response
--------
{
  Return Code: 0
  Key        : <None>
  Files      : [
    {
      Return Code: 0
      Data       : java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode)

    }
  ]
}

Thanks,
David


                                                                       
 David Bender          11501 Burnet Rd.   Phone (T/L): 1-512-286-5315  
 STAF/STAX Development Bldg. 903-5B002    (363-5315)                   
                       Austin, TX         ITN: 23635315                
 IBM Software Group,   78758-3400         Email: bda...@us.ibm.com     
 WPLC                                                                  
                                                                       
                                                                       






                                                                       
  From:       Ahmed Mostafa <eng.ahmed2...@gmail.com>                  
                                                                       
  To:         STAF <staf-users@lists.sourceforge.net>                  
                                                                       
  Date:       08/16/2010 07:43 AM                                      
                                                                       
  Subject:    [staf-users] STAFUtil.wrapData and                       
                                                                       





Hello,

I used the function STAFUtil.wrapData() to wrap the path to a command but
I'm getting the following error (actually I get same error if I don't use
the function and enclose that file name between double quotes):
staf local PROCESS Start Shell Command :54:C:\Program Files\IBM
\SQLLIB_V97FP3_100805\BIN\db2unins Parms -u {STAF/DataDir}\tmp\TIAT
\Windows_db2un.rsp -y Wait SameConsole StdErrToStdOut ReturnStdOut
{
  Return Code: 1
  Key        : <None>
  Files      : [
    {
      Return Code: 0
      Data       : 'C:\Program' is not recognized as an internal or
external command,
operable program or batch file.

    }
  ]
}
I attempted the above command in Windows 2003, Vista and 2008.
What is the problem in the above command?

Thanks
--
Ahmed Mostafa Abdel-Baky
Associate Software Engineer
DB2 NSE Support
Cairo Technology Development Center
IBM Egypt
Mobile: 0110887370
Office: +202-35361459
E-mail: ab...@eg.ibm.com
------------------------------------------------------------------------------

This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to