Re: & Now, a Script to List the Running Process Info - Re: Useful little Script to Show the Memory Usage Figures - Re: Computer Problems



"Saxman" <john.h.williamsREMOVETHIS@xxxxxxxxxxxxxx>
wrote in message news:YfWdnQw5mYp_Ek3ZnZ2dnUVZ8s-dnZ2d@xxxxxxxxx
pmj wrote:

Then Run (Open) it.
That will Pop up a simple MessageBox, containing the Memory
Properties & Values, obtained from the WMI Database.

Done that to the desktop folder, thanks.

Ah, right...

So, now all you have to do is to Run it (using the Command cscript
at a Command Prompt, with the Name of the Script File (after a Space,
followed by another Space & then the ">" ReDirecxtion Character,
followed by another Space & the Name (with Optional Path) of the
File to Save the Output in)...

OK, yes, that might sound complicated! - But it's actually very easy,
when you know how - the important thing is to know how to get to
the Folder where you have Saved the Script, when using the Command
Prompt.

I'll Reply to your other Reply, (& see below) with how to do that.

Another way is to Save the Script not to the Desktop (which is in
a Folder buried deep in the "Documents & Settings" Folder), but to
a Folder where the Command Prompt Opens (either the Root of the
C: Drive (C:\) or your "Home" Directory"

(But this one does the (Running) Process Info)

If you want the Output as a Text File, then Run it from
a Command Prompt (Make sure that you're in the Directory
where you have saved the .VBS Script File) & ReDirect the
Output to a Text File, using the ">"Redirection Character...

Not too sure about what to do here to create a text file.
You need to be more specific.

OK - No probs - see my other Reply.

... I right-clicked on the vbs file in the desktop folder and
selected 'Open from command prompt'. A dos window pops up and
goes in a second.

Ah yes - that Option "Open with Command Prompt" is OK, but it
*doesn't* let you add on the required Parameters!
So (as you found out) the Command Prompt window Open, the Script
Runs & the Output goes to the *Window* (rather than a File or
a Dialog Box) & then the Window Closes as soon as the Script
finishes!

You would need to Open a Command Prompt yourself & then Navigate
to the Directory (Folder) where the Script is & Run it from there
(or use the Path to the Directory with the Script in it), when you
Run it.

You can make use of the "Environment Variables", to locate the Folder
with the Script in (cos the Path to the Desktop Folder varies with
each User & is different on different Installations

cscript MemUsage.vbs > memusage.txt

One way to do it (if you've Saved the Script to the Desktop
& when you Open the Command Prompt Window, the "Working Directory"
isn't the Desktop) is to specify the Path to the Script (on the
Desktop) in the Command Line...

C:\> cscript "%HomePath%\Desktop\MemUsage.vbs" > memusage.txt

(Where "C:\>" is the "Command Prompt" that you see on the Screen
Don't actually type the "C:\>" bit in )

& Use (for the ProcessInfo one)...

cscript ProcessInfo.vbs > processinfo.txt

& again, if the Command Prompt is showing "C:\>" rather than your
Desktop, use...

C:\> cscript "%HomePath%\Desktop\ProcessInfo.vbs" > processinfo.txt

The %HomePath% bit is just an "Environment Variable", which contains
the full Path to your User Folder - it expands to something like:

C:\Documents and Settings\saxman
(where "saxman" is whatever your windoze User Name is & we're assuming
that your Desktop Folder is in the normal place, as a SubFolder of that.

windoze takes care of all that sort of thing & when you Click on things
in windoze Explorer, it hides from you all the stuff about the paths
that matter, when you're using a Command Prompt.

BTW - you need to use the Quotes in that Command Line, cos of the
Spaces in the Path

& when you Run the Script like that, nothing much seems to happen,
but what it's doing is Sending the Output directly to the Text File
specified in the Command Line - it should be in the same Directory
(Folder) - the Desktop - that the Script is in, or it might be in
the Directory you are in, when you Run the Script.

Then you can Open the Text File, look at the Info & Copy & Paste
it into a News post.

I understand the coding, but not the method. You will have to spell
it out to me bit by bit! Sorry.

Which I've tried to do above.
I hope that makes sense?

It looks so very complicated, when it's all written down, but it
actually takes far less time to *do* it, than to explain it!

Try it & post back if you have any Queries about any of how to
do it.

I will as soon as get around the text file problem.

See above (& my other Reply)

We can then also use a similar thing to check the Running Processes
& their Properties & Memory Usage etc.

I have replaced the RAM and the PC is just about holding up ATM.

Great!!!

Replaced?
Or Added to?

But anyway it will still be a good idea to check to see that
there's nothing that is "leaking memory"

HTH

--
pmj


.



Relevant Pages

  • Re: Whered my hard drive space go?
    ... Volumes in Windows XP ... check your folder shares, check the status of the Guest Account, and check ... Tales from the Script - November 2003 ... from the command prompt, ...
    (microsoft.public.windowsxp.basics)
  • Re: Finding members of RDP groups of a list of computers
    ... got the script to work by double clicking the vbs file. ... cscript //nologo RDPMembers.vbs> report.txt from the command prompt? ... MVP Directory Services ... Your text file of computer names must be located in a folder on ...
    (microsoft.public.scripting.vbscript)
  • Re: Automating steps to copy URL from IE into Word
    ... When the application opens, it prompts the user for a comment, which then makes it necessary to scroll down to where the button is to execute the program. ... Documents" folder. ... >> I'm curious to see if character formatting in the selection, ... I've done a script that adds a new item to your Internet ...
    (microsoft.public.word.vba.general)
  • Re: cant access logon script using UNC path
    ... the GPO, go to the Logon script section, click Show Files and it opens ... the folder for you within the GPO folder hierarchy of where it stores the script. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Command Prompt
    ... > to start up in the command prompt, ... > other icon I'd like to drag folders to it to start up the ... to it to start up the command prompt in that folder. ... cmd opens at the location of your choice! ...
    (microsoft.public.windowsxp.configuration_manage)