ScriptLogic.com: Windows Desktop Management…Point, Click, Done!


Desktop Management

Windows Servers & Security

Other Products




Custom Script: C0007

Overview:

So you need to allocate more file handles and environment space on your Windows 95/98 clients for a legacy DOS application? All 1,200 of them? Using the following examples, you can adjust the global environment space on your Win 9x systems and increase the allocated file handles on Win 9x and Win NT.


Add these line(s) to your Custom Script:

; ** Routine to adjust 95/98's environment space allocation in config.sys **
if $OStype<>'NT'
  $file='$SystemDrive\config.sys'
  $reqshellenvline='%COMSPEC% /e:1024 /p'
  $result=readprofilestring($file,'Common','Shell')
  if $result<>$reqshellenvline
    $result=writeprofilestring($file,'Common','Shell',$reqshellenvline)
  endif
endif
; ** Routine to adjust file handles in config.sys and config.nt **
if $OStype='NT'
  $file='%SYSTEMROOT%\SYSTEM32\CONFIG.NT'
else ;Win 95/98
  $file='$SystemDrive\config.sys'
endif
$minfilehandles='200'
$result=readprofilestring($file,'Common','files')
if val($result)<val($minfilehandles)
  $result=writeprofilestring($file,'Common','files',$minfilehandles)
endif

Created: 17 April, 1999
Last Revised: 22 July, 2004