Not to seem even more thick, but I tried this
test script, and it didn't work:

writeprofilestring ("test.ini", "SystemInfo", "ComputerName", "testing")

Where the test.ini file resides in the C:\Windows dir. Do I need add the line CD "C:\Windows" above the writeprofilesting line?