Page 1 of 1

Dislplay PC - CPU - RAM With DOS via Bat file- Help Needed

Posted: 06 Mar 2012 08:20
by kevinbarker
I have a script to copy files from my nas to a local machine, and install office 2007.

Before the script runs, i would like it to display the CPU speed and RAM.Then if the user wants to run the script press continue, or No for ( run the Script later )
the is on xp and win 7, thanks for any help

@echo off

net use Z: /d /y
net use Z: \\NAS ADDRESS
xcopy Z:\software /s c:\software\ /y


c:\software\Office_2007\setup.exe /adminfile c:\software\Office_2007\full.msp

Re: Dislplay PC - CPU - RAM With DOS via Bat file- Help Need

Posted: 06 Mar 2012 11:19
by Squashman

Code: Select all

systeminfo | findstr /C:"Total Physical Memory" /C:"Processor(s)" /C:"Mhz"
:Menu
set /p answer=Do you wish to continue? :
IF /I "%answer%=="N" GOTO :EOF
IF /I "%answer%=="Y" GOTO :script
GOTO :Menu
:script
net use Z: /d /y
net use Z: \\NAS ADDRESS
xcopy Z:\software /s c:\software\ /y

Re: Dislplay PC - CPU - RAM With DOS via Bat file- Help Need

Posted: 06 Mar 2012 12:12
by foxidrive
Small changes to the menu routine here.

Code: Select all

:Menu
set "answer="
set /p "answer=Do you wish to continue? [Y/N] :"
IF /I "%answer%"=="N" GOTO :EOF
IF /I "%answer%"=="Y" GOTO :script
GOTO :Menu
:script