# FB6 - Dos Command, Log To Variable includes parameters

**URL:** https://www.finalbuilder.com/forums/t/fb6-dos-command-log-to-variable-includes-parameters/1047
**Category:** Discussion
**Created:** [December 3, 2008, 6:40am UTC](https://www.finalbuilder.com/forums/t/fb6-dos-command-log-to-variable-includes-parameters/1047 "2008-12-03T06:40:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mprice](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@mprice](https://www.finalbuilder.com/forums/u/mprice)
#### Post date: [December 3, 2008, 6:40am UTC](https://www.finalbuilder.com/forums/t/fb6-dos-command-log-to-variable-includes-parameters/1047/1 "2008-12-03T06:40:50Z")

</div>

I have many actions in which I use a DOS Command to run a command line utility that returns output data in an XML string.&nbsp; I would use the "Log to Variable" feature to capture the output into a variable.&nbsp; I would then use the AfterAction event to load the XML from the variable into a DOM and parse what I needed.

As of FinalBuilder 6, it appears that the command line is being prefixed to the output if using the "Log to Variable".&nbsp; So in FB5, I would get the following example output in a variable:

**XMLData**

from a Run DOS Command action that ran the following command line:

**accurev show -fx -H"AKSWDEV-VH1:5050 Productivity Framework" -s"QA3\_system" streams**

Now in FB6, I get the following output in the variable using the same action and command line:

**Parameters: /c accurev show -fx -H"AKSWDEV-VH1:5050 Productivity Framework" -s"QA3\_system" streamsXMLData**

Is there a way to supress the " **Parameters: /c accurev show -fx -H"AKSWDEV-VH1:5050 Productivity Framework" -s"QA3\_system" streams**" part from showing up in the output.&nbsp; It makes it impossibly to load the XML right into a DOM without first cleaning off the prefixed text.

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [December 3, 2008, 11:17am UTC](https://www.finalbuilder.com/forums/t/fb6-dos-command-log-to-variable-includes-parameters/1047/2 "2008-12-03T11:17:05Z")

</div>

Hi Mark,   
  
 We’ve added a new property to most of the actions that execute an external process to suppress the logging of the command parameters, you can find the property, ‘Log Process Parameters’, in the ‘Logging’ category of the action’s properties.   
  
 You can download the latest build of FinalBuilder 6.2 which includes this property from:   
  
 URL: [www.finalbuilder.com/downloads/finalbuilder/620/FB620\_1182.exe](http://www.finalbuilder.com/downloads/finalbuilder/620/FB620_1182.exe)   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![mprice](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@mprice](https://www.finalbuilder.com/forums/u/mprice)
#### Post date: [December 3, 2008, 11:29am UTC](https://www.finalbuilder.com/forums/t/fb6-dos-command-log-to-variable-includes-parameters/1047/3 "2008-12-03T11:29:45Z")

</div>

Thanks, Paul.&nbsp; I installed the latest you pointed me to, but this did not solve the problem.&nbsp; For a Run DOS Command action, the command line itself is still prefixed to the variable if I choose to "Log To Variable".&nbsp; For example,&nbsp;if the command line program is:

**myprogram -param1 -param2**

&nbsp;the output from the command line action is:

**This is text that is output from the command line program**

and I choose the following&nbsp;logging properties on the action:

**LogToVariable = True**

**LogActionPropertoes = False**

then the resulting value in the Variable is:

**/c myprogram -param1 -param2 This is text that is output from the command line program**

I need to be just

**This is text that is output from the command line program**

Any thoughts on how to surpress the first part?&nbsp; The LogActionProperties = False seems to only prevent these items from being logged:

**ActionComment =   
Command = myprogram -param1 -param2  
Description = Get Workspace Basis Stream  
Enabled = True  
EnableLiveCapture = True  
EnableReturnCodeCheck = True  
EnableTimeout = False  
ExpandActionLogTitle = True  
ExtraCmdLineParamsAtEnd =   
ExtraCmdLineParamsAtStart =   
HideActionFromLog = False  
HideWindow = True  
IgnoreFailure = False  
ImpersonateUser = False  
ImpersonateUserName =   
LogActionProperties = True  
LogOutput = True  
LogProcessParameters = True  
LogToVariable = TempString  
MaxRetryAttempts = 0  
PauseInterval = 0  
ProcessorAffinity = 0  
ProcessPriority = tpNormal  
RedirectStdErr = True  
RetryPauseInterval = 1000  
ReturnCodeComparator = rcLessThanEqualTo  
ReturnCodeToCheck = 1  
StartInDir =   
SuppressStatusMessages = False  
TerminateOnTimeout = True  
TimeoutLength = 1  
UseErrorDialogMonitor = False  
WaitForCompletion = True**

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [December 3, 2008, 11:38am UTC](https://www.finalbuilder.com/forums/t/fb6-dos-command-log-to-variable-includes-parameters/1047/4 "2008-12-03T11:38:37Z")

</div>

Hi Mark,   
  
 You need to set ‘Log Process Parameters’ to false, rather then ‘Log Action Properties’ (although that should also be set to false in this case). The ‘Log Process Parameters’ has not be exposed in the action’s properties dialog, you’ll need to set it from the ‘Properties / Action Inspector’ tab of the action ([https://www.finalbuilder.com/finalbuilder/Help/HTML/actioninspector.htm](https://www.finalbuilder.com/finalbuilder/Help/HTML/actioninspector.htm))   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![mprice](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@mprice](https://www.finalbuilder.com/forums/u/mprice)
#### Post date: [December 3, 2008, 11:40am UTC](https://www.finalbuilder.com/forums/t/fb6-dos-command-log-to-variable-includes-parameters/1047/5 "2008-12-03T11:40:22Z")

</div>

Ah, perfect. Thanks!
