Announcement

Collapse
No announcement yet.

Command Environment Memory Limits

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Command Environment Memory Limits

    Hey all,

    I am wondering if anyone knows of any environment variable limitations with regards to CMD.EXE in the NT Type machines (NT, 2K, XP, VISTA, 2K3). We have a need to store data in environment variables and I fear that we may run out of memory if we need to store alot of data there

    TIA
    Sr. Software Development Engineer and Sr. Information Security Analyst,
    CEH, Digital Forensic Examiner

  • #2
    Source: http://www.computerhope.com/cmd.htm, found quickly by Google-ing "environment size cmd.exe"
    CMD.EXE ... /E:nnnnn
    Sets the initial environment size to nnnnn bytes. (nnnnn should be between 256 and 32,768).
    Kinda suggests you can set it yourself, but not larger than 32,768

    Not tested; exercise left to user.

    Need more - or rather, want more space in which to share data? In that case we need more info about the application... like is it an MS-DOS or Windows appliacation would be a really good start.

    MCM
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Hey Michael,

      Thanks for the reply. It is actually a windows app that uses the environment to store test specific data. This is a legacy test framework that I would like to get changed to use xml as the data source instead of Environment variables
      Code:
      CMD.EXE /E:ON or OFF is for enabling or disabling command extensions on XP and 2K3
      Thanks for the Info
      Last edited by Thomas Tierney; 23 Jan 2008, 05:32 PM.
      Sr. Software Development Engineer and Sr. Information Security Analyst,
      CEH, Digital Forensic Examiner

      Comment


      • #4
        I would like to get changed to use xml as the data source instead of Environment variables
        How about an INI file? that would surely be easier to use to set parameters for a test run, wouldn't it? OR even a simple text file

        Code:
        param1
        param2
        string_Parameter
        ...
        end data
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          your absolutely right michael, anything would be easier than environment variables but the problem with the ini file is it doesnt support unicode (never did). I did check and the limit is 32K of data. With 256 bytes of data I can use 128 enviroment vars.
          Sr. Software Development Engineer and Sr. Information Security Analyst,
          CEH, Digital Forensic Examiner

          Comment


          • #6
            If it's just a "text" file, you can save Unicode strings... or even save as ANSI and convert to Unicode as required. (And you can save the ANSI in an INI).

            I think we have here one more example: When designing your applications one of the questions you must ask and answer BEFORE writing that first line of code is, "How am I going to test this?"

            MCM
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment

            Working...
            X