Computing.Net > Forums > Programming > how to creat a bat file which RAM

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

how to creat a bat file which RAM

Reply to Message Icon

Name: rakesh gupta
Date: October 30, 2008 at 03:09:22 Pacific
OS: windows XP
CPU/Ram: intel 2.8gh, 256RAM
Product: P4
Comment:

Hi Friends.

I want to creat a bat file which check the system ram and if system have less than 256MB RAM, it execute one of the program and if system more than 256MB RAM it execute another program.

Regards
rakesh gupta



Sponsored Link
Ads by Google

Response Number 1
Name: BatchFreak
Date: October 30, 2008 at 07:20:55 Pacific
Reply:

IS that your question? How to do it, or is there a particular part that is troubling you?

I only Batch if possible, 2000 more lines of code, oh well.


0

Response Number 2
Name: Holla
Date: October 30, 2008 at 21:39:13 Pacific
Reply:

If you have systeminfo and findstr, which I guess xp has, (I have it in Vista), you can use the following batch script:
It executes SystemInfo, extracts the line that has Total Physical Memory and parses the number out. (Assumes that it always prints in MB.)


systeminfo | findstr /c:"Total Physical Memory:" > totmem.out
for /f "tokens=4* delims=: " %%a in (totmem.out) do set TotalMemWithComma=%%a
set TotalMem=%TotalMemWithComma:,=%
if /i %Totalmem% lss 256 (One-of-the-program) else (another-program)

--
Holla.


0

Response Number 3
Name: rakesh gupta
Date: October 30, 2008 at 22:07:16 Pacific
Reply:

Hi BatchFreak,

Good Morning!

This is my question, how to do it.

Thanks for your reply.

Regards
Rakesh


0

Response Number 4
Name: BatchFreak
Date: November 1, 2008 at 22:35:43 Pacific
Reply:

Ok I worded my question wrong obviously. I was asking if you had anything at all towards it done or if it was a ceratin part that you needed help with.

I only Batch if possible, 2000 more lines of code, oh well.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


shortcut to HELP VBA XL insert row & move ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: how to creat a bat file which RAM

How to create a text file using FSO www.computing.net/answers/programming/how-to-create-a-text-file-using-fso/10319.html

Create a bat file www.computing.net/answers/programming/create-a-bat-file/18494.html

how to creat a NEW .dat file in C? www.computing.net/answers/programming/how-to-creat-a-new-dat-file-in-c/4558.html