This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Urgent help please: Renaming log to file path name- Adding a custom variable using Jscript

Hello,

Currently my log to file path is: C:\KiwiSyslog\%HostName\%DateISO.txt

However, I want the path to be C:\KiwiSyslog\%HostName\%CustomVariable01\%DateISO.txt

I am trying to write a script where the custom variable is assigned a value depending on the HostIP Address (if  %HostName is 00.00.00.000 then CustomVariable01 is "XYZ"). 

This is the script I have- 

function main(){
var HostName= VarPeerAddress;
var customVariable= "undefined";
if (HostName= 00.000.00.000)
customVariable="XYZ";
return customVariable;
}
else
{
var customeVariable= "unidentified";
return customVariable;
}
VarCustom01 = customVariable;
return "OK";
}

Can someone help me with the correct syntax of the JScript? Thanks