Solved Environmental Variable ComSpec

doncole

New Member
Messages
20
What should be in the Environmental Variable ComSpec windows 4.1?

I erased mine by mistake.

What I've read I'm going to try C:\system32\cmd.exe.

But If it's wrong my computer won't restart.

Is this path correct?

Don Cole
 

My Computer

System One

  • OS
    windowws 8.1
If Windows is installed in C:\Windows then it should be
C:\windows\system32\cmd.exe
 

My Computer

System One

  • OS
    Windows 8.0 x64
    Computer type
    Laptop
    System Manufacturer/Model
    Toshiba Satelite C55D-A Laptop
    CPU
    AMD EI 1200
    Memory
    4 gb DDR3
    Graphics Card(s)
    Raedon 340 MB dedicated Ram
    Monitor(s) Displays
    Built in
    Screen Resolution
    1366 x 768
    Hard Drives
    640 GB (spinner) Sata II
    Keyboard
    Built in
    Mouse
    Touch pad
The COMSPEC environment variable can be used to specify where command.com (DOS) or cmd.exe (OS/2, Windows) can be found. It could also be used to specify that a different command interpreter than cmd.exe be used.

Back in the floppy only DOS days, it was common to create a RAM disk and copy command.com to it. As you inserted and removed floppy disks while working, DOS would need to reload command.com and, if command.com wasn't found on any disk currently in the machine you would be prompted to insert a disk containing command.com. Having command.com on a RAM disk and specifying that it could be found there via the COMSPEC environment variable, meant that you never needed to re-insert a disk containing command.com because it could be loaded from the RAM disk. It was a great time saver in those days.
 

My Computer

System One

  • OS
    W10 Pro (desktop), W10 (laptop), W10 Pro (tablet)
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Home built i7-8700K, Hp Envy x360 EVO Laptop, MS Surface Pro 7
    CPU
    3.7Ghz Core i7-8700K, 11th Gen Core i7-1165G7 4.7Ghz, 10th Gen Core™ i5-1035G4 1.1Ghz
    Motherboard
    ASUS TUF Z370-Pro Gaming, HP, MS
    Memory
    16G, 8G, 8G
    Graphics Card(s)
    AMD Radeon RX580, Intel Iris X Graphics, Intel Iris Plus Graphics G4
    Sound Card
    ATI High Definition Audio (Built-in to mobo)
    Monitor(s) Displays
    Dual Samsung U32J59 32 inch monitors, 13.3" display, 12.3" display
    Screen Resolution
    3840x2160 (Desktop), 1920x1080 (laptop), 2736x1824 Pro 7
    Hard Drives
    500GB ssd boot drive with 2 & 10TB Data (Desktop), 512GB ssd (laptop), 128GB SSD (tablet)
    PSU
    Corsair CX 750M
    Case
    Antec 100
    Cooling
    Coolermaster CM 212+
    Keyboard
    IBM Model M - used continuously since 1986
    Mouse
    Microsoft IntelliMouse
    Internet Speed
    665Mbps/15Mbps down/up
    Browser
    FireFox, MS Edge
    Antivirus
    Defender on all
    Other Info
    Retired in 2015 after working in the tech industry for 41 years. First 10 years as a Technician, the rest as a programmer/software engineer. After 1 year of retirement, I was bored so went back to work as a Robotic Process Automation Consultant. Retired for 3rd (and final) time in 2019.
The COMSPEC environment variable can be used to specify where command.com (DOS) or cmd.exe (OS/2, Windows) can be found. It could also be used to specify that a different command interpreter than cmd.exe be used.

Back in the floppy only DOS days, it was common to create a RAM disk and copy command.com to it. As you inserted and removed floppy disks while working, DOS would need to reload command.com and, if command.com wasn't found on any disk currently in the machine you would be prompted to insert a disk containing command.com. Having command.com on a RAM disk and specifying that it could be found there via the COMSPEC environment variable, meant that you never needed to re-insert a disk containing command.com because it could be loaded from the RAM disk. It was a great time saver in those days.

As example of the first use my cmd prompt replacement shows comspec as
C:\Program Files\JPSoft\TCCLE13x64\TCC.EXE

:)
 

My Computer

System One

  • OS
    Windows 8.0 x64
    Computer type
    Laptop
    System Manufacturer/Model
    Toshiba Satelite C55D-A Laptop
    CPU
    AMD EI 1200
    Memory
    4 gb DDR3
    Graphics Card(s)
    Raedon 340 MB dedicated Ram
    Monitor(s) Displays
    Built in
    Screen Resolution
    1366 x 768
    Hard Drives
    640 GB (spinner) Sata II
    Keyboard
    Built in
    Mouse
    Touch pad
Back
Top