Hello

I am trying to edit a .ini file, currently it opens the FSP.ini file and looks for to entries labled LastUser and PCAlias and replaces the values with %USERNAME%

This works great except I need it to limit the characters being put in by %USERNAME% to only 8 characters. So if a persons username is 9 or 10 characters it will only show 8 of them. Is there a way to do this?

Break on

$inifile = "C:\Fsp.ini"

$value = ReadProfileString($inifile, "UBS", "LastUser=")

$rc = WriteProfileString($inifile, "UBS", "LastUser", ""%USERNAME%")

$value = ReadProfileString($inifile, "UBS", "PCAlias=")

$rc = WriteProfileString($inifile, "UBS", "PCAlias", "%USERNAME%")
EndIf
_________________________
www.omfgservers.com