#-------------------------------------------------------- # File: SetMaxFileSize.eps # # Sets the maximum capture file size for DarkSkyline tools # # Modifications: # 01/14/2003 Created. #-------------------------------------------------------- @echo off; if ($argc != 2) { echo "Usage: $argv[0] "; return false; } string $driver = $argv[1]; # make sure it's not already installed ifnot (`regquery -hive L -subkey SYSTEM\\CurrentControlSet\\Services\\$driver`) { echo "* $driver is not yet installed"; return false; } echo ""; echo "Enter a size of zero for an unlimited packet size"; echo ""; int $size = GetInput("Enter the maximum size for captured packets (in bytes)"); if ($size < 0) { echo "Size must be greater than or equal to zero"; return false; } if ($size == 0) { $size = 65536; } # add the registry keys bool $keysAdded = true; echo "Adding maximum packet size registry key"; ifnot (`regadd -hive L -key SYSTEM\\CurrentControlSet\\Services\\$driver -value Duration -type REG_DWORD -data $size`) { echo " FAILED"; return false; } echo " SUCCESS"; return true;