Topic
  • 1 reply
  • Latest Post - ‏2012-11-27T16:34:31Z by brcowan
thalapathi
thalapathi
128 Posts

Pinned topic List the output of imcl in windows batch file

‏2012-11-26T22:32:16Z |
Hi All,

Could you please anyone update me how to store the output of "imcl listinstalledpackages" command in windows batch file variable?

Thanks in advance.

Cheers,
Jose
Updated on 2012-11-27T16:34:31Z at 2012-11-27T16:34:31Z by brcowan
  • brcowan
    brcowan
    739 Posts

    Re: List the output of imcl in windows batch file

    ‏2012-11-27T16:34:31Z  
    Given that that command output is a multi-line output, it may not be all that simple.

    For example:
    C:\Program Files (x86)\IBM\Installation Manager\eclipse\tools>imcl listinstalledpackages
    com.ibm.cic.agent_1.6.0.20120831_1216
    com.ibm.rational.clearcase.nt_i386_8.0.4.0000-8-0-0-04-00-2012C-D120904
    com.ibm.rational.clearcase.rc_8.0.4.0000-8-0-0-04-00-2012C-D120904
    


    If the total length of the lines doesn't exceed the maximum command line length, you can try something like this:
    for %%x in ('"C:\Program Files (x86)\IBM\Installation Manager\eclipse\tools\imcl" listinstalledpackages') do set INS_PACK=%%x;%INS_PACK%
    


    =================================================================
    Brian Cowan
    Advisory Software Engineer
    ClearCase Software Advisory Team (SWAT)
    Rational Software
    IBM Software Group
    550 King St
    Littleton, MA 01460

    Phone: 1.978.899.5436
    Web: http://www.ibm.com/software/rational/support/
    Updated on 2014-03-26T13:44:56Z at 2014-03-26T13:44:56Z by iron-man