Marck...Here's a really kludgy way to do it.
Unfortunately it seems that we can't use the writeprofilesstring() function to change the config.sys file (cause there's no section headers). Can anyone think of a hack for this ?
I don't have win9x but it works for WinNt. As well, it would be nice to be able to check a registry value (files=n) or a file timestamp before-hand so you wouldn't have to do this everytime a user logged in (anyone?)
code:
break on$config = "c:\winnt\system32\config.nt"
$temp = "c:\winnt\system32\config.tmp"
$cr = chr(10)
del $temp
$rs = open ( 1, $config, 2 )
$rs = open ( 2, $temp, 5 )
$line = readline(1)
while @error = 0
if $line = "files=20"
$rs = writeline(2,"files=100"+$cr)
else
$rs = writeline(2,$line+$cr)
endif
$line=readline(1)
loop
$rs = close(1)
$rs = close(2)
copy $temp $config
exit
Shawn.