1.

Solve : Need a Variable to Specify the Drive that the OS is installed onto..???

Answer»

is there a variable i can use to specify the drive that the OS is installed onto..??
do you mean that you want to KNOW if there is a variable that a command or batch file can read and find out where the OS is installed?



yuppers..The variable is %systemdrive%

c:\>echo %systemdrive%
C:


I am surprised that you don't know about typing SET at the command prompt to see the system variables.

c:\>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Mike\Application Data
CLASSPATH=.;C:\Program Files\Java\jre1.5.0_04\lib\ext\QTJava.zip
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=PUPP-C92F25ED23
ComSpec=C:\WINDOWS\system32\cmd.exe
dircmd=/OG
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Mike
LOGONSERVER=\\PUPP-C92F25ED23
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Program Files\Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System3
2\Wbem;c:\batch;C:\Program Files\ATI Technologies\ATI Control Panel;C:\cygwin\bin;C:\Program Files\S
upport Tools\;C:\PROGRA~1\NetMailBot;C:\Program Files\UltraEdit;C:\Program Files\ATI Technologies\AT
I.ACE\;C:\PROGRA~1\NcFTP;C:\Program Files\QuickTime\QTSystem\;C:\WINDOWS\System32\spool\DRIVERS\W32X
86\3;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\MKVtoolnix;C:\Program Files\UltraEd
it;C:\Program Files\JPSoft\4NT7;c:\utils;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 3 Stepping 4, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0304
ProgramFiles=C:\Program Files
Prompt=$P$G
QTJAVA=C:\Program Files\Java\jre1.5.0_04\lib\ext\QTJava.zip
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\Mike\LOCALS~1\Temp
TMP=C:\DOCUME~1\Mike\LOCALS~1\Temp
USERDOMAIN=PUPP-C92F25ED23
USERNAME=Mike
USERPROFILE=C:\Documents and Settings\Mike
windir=C:\WINDOWS






Discussion

No Comment Found