Modify Value of Line In File
Log In or Register to download the BES file, and more.

0 Votes

Description


Property Details

ID26946
StatusAlpha - Code that was just developed
TitleModify Value of Line In File
DomainBESC
SourceMike Consuegra
Source Release Date9/7/2019 12:00:00 AM
Is TaskTrue
Added by on 8/10/2022 2:37:15 PM
Last Modified by on 8/10/2022 2:37:15 PM
Counters 2082 Views / 2 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 0 ratings. ** Log In or Register to add your rating.

Relevance

Used in 1 fixlet   * Results in a true/false
Show indented relevance
exists file "C:\temp\ClientAgent.cfg"
Used in 1 fixlet   * Results in a true/false
Show indented relevance
following text of first "=" of (lines of file "c:\temp\ClientAgent.cfg" as string) whose (it contains "SITE_CONTROLLER_ADDRESS") = ""

Actions

Action 1 (default)

Action Link Delete  hosts file entry.
Script Type BigFix Action Script
action parameter query "ipaddress" with description "Enter the value to add to the 'SITE_CONTROLLER_ADDRESS' field:"

delete __createfile

createfile until EOF
{concatenation "%0D%0A" of ((it) as string) whose (it does not contain "SITE_CONTROLLER_ADDRESS=") of (lines of file "c:\temp\ClientAgent.cfg")}
SITE_CONTROLLER_ADDRESS={parameter "ipaddress"}
EOF

dos del /F "c:\temp\ClientAgent.cfg"

move __createfile "C:\temp\ClientAgent.cfg"
Success Criteria

This action will be considered successful when the applicability relevance evaluates to false.


Sharing

Social Media:
Share this page on Yammer

Comments

Log In or Register to leave comments!