; **** Testing READPROFILESTRING in Windows 7 - Build 7000
? "ReadProfTest running on @PRODUCTTYPE"
$iniFile = "c:\scratch\Win7test.ini"
; Test 1 - Section and key present
$val = ReadProfileString($iniFile,"TESTSECT1","SOMEKEY1")
? "Test 1 Results - file, section, key present."
? " Key Value = $val"
? " ERROR: @ERROR"
? " SERROR: @SERROR"
; Test 2 - Section present but key absent
$val = ReadProfileString($iniFile,"TESTSECT2","NOKEYFND")
? "Test 2 Results - key absent."
? " Key Value = $val"
? " ERROR: @ERROR"
? " SERROR: @SERROR"
; Test 3 - Section and key absent
$val = ReadProfileString($iniFile,"NOSECTFND","NOKEYFND")
? "Test 3 Results - Section and key absent."
? " Key Value = $val"
? " ERROR: @ERROR"
? " SERROR: @SERROR"
; Test 4 - No ini file found
$val = ReadProfileString("C:\NOSUCHFILE.INI","TESTSECT","TESTKEY")
? "Test 4 Results - INI file missing."
? " Key Value = $val"
? " ERROR: @ERROR"
? " SERROR: @SERROR"