Solved Can't run .bat files

Brink
A very sensible suggestion of using system restore.
Unfortunately I have no idea when .bat files stopped working. I haven't created a bat file myself for about 10 years. I switched to .vbs files when I could as they were more in line with my programming knowledge at that time .
Looking at all the batch files on my pc, it seems that before the Android studio installation which revealed this issue I had no .bat file on my pc that was later than 2010.
And the other issue I have is that I have installed and uninstalled what I believed to be the 'problem' software so many times over the last two weeks that I've pushed any earlier restore points off my machine. Even after a lifetime in IT I can still fail to have proper backups!!
 

My Computer

Computer type
PC/Desktop
OS
windows 7 64
pyprohly- Oh Boy!!! That looks like the culprit. There was an extra entry in there in addition to cmd.exe - I don't know if I added by mistake it thinking I was editing PATH or it was added by the Android stuff, but I've removed it and it looks like things might be working again. I have to do a bit more testing yet but this is most promising step so far.

Thank you so much - if this fixes it you cannot imagine how grateful I am.
 

My Computer

Computer type
PC/Desktop
OS
windows 7 64
:thumbsup:

For anyone else with a broken ComSpec variable (and can't run batch files), with an Elevated Command Prompt,
Code:
setx ComSpec %SystemRoot%\system32\cmd.exe /m
to reset the environment variable to what it should be.
 

My Computer

Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
I've spent a few hours reloading everything I'd unloaded over the past few days, and it all seems OK.
So thanks to all who responded but of course especially to pyprohly who persuaded me to check something I assumed(!!) would not be an issue.
 

My Computer

Computer type
PC/Desktop
OS
windows 7 64
Great news, and great job Pyprohly. :party:
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Another happy customer. Well done folks.

@Pyprohly

You are just full of neat trick. Well done.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home made Desktop
OS
Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
CPU
Intel i7-6800K @ 4.3
Motherboard
ASUS X-99 Deluxe II
Memory
Corsair Platinum 16 gig @2400
Graphics Card(s)
EVGA GTX 1070 OC
Monitor(s) Displays
Asus 27" LED LCD/VE278Q
Screen Resolution
1920-1080 or 1280-720 HDMI
Hard Drives
INTEL SSD 730-240 Gb Sata 3.0/
PSU
EVGA Platium 1200W
Case
Phanteks Luxe Tempered Glass 8 fans/ one radiator
Cooling
XSPC/ Water Cooled CPU
Keyboard
Das 4 Professional
Mouse
Logitech M705/MX Anywhere 2-S
Internet Speed
100 mbits
Antivirus
Microsoft Security Essentials/ Malwarebytes Premium 3.0/ SAS
Browser
I.E. 11 default/Firefox/ ISP Time Warner Cable/Spectrum
Other Info
LG BluRay Burner/
Sound system-KLipsch-THX/
Icy Dock ssd Hot Swap bays.
Pyprohly you are my hero!!!

Thank you so much!!! Had the same issue for about half a year and finally found your solution!!!!!
You can't imagine how happy I am!!!
I got this issue while trying android studios too... That google...xD
WOW, I'm so happy!!! Can't stop to repeat it :D
Thanks to Pyprohly :D:D:D:D
 

My Computer

Computer type
PC/Desktop
OS
Windows 7, 64 bit
Had the same issue for about half a year and finally found your solution!!!!!
That must have been a lot of Web digging. Glad you found what you're looking for here.


Lots of other people are using the same source material, apparently without this problem as no-one has any idea what I'm talking about.
I got this issue while trying android studios too... That google...xD
Somebody who understands you, Peter :')

How these ComSpec variables get out of place in the first place is what I wanna to know. Something fishy about that Android Studios...
 

My Computer

Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
That must have been a lot of Web digging. Glad you found what you're looking for here.
Oh yes, it was! I gave up on it with a workaround, because I could run the .bat as admin and most other things worked with that too.
But then about a month ago I had problems again and today I tried to find a solution and finally found that thread! :)

How these ComSpec variables get out of place in the first place is what I wanna to know. Something fishy about that Android Studios...
Yeah, don't know what's wrong... My ComSpec was set to something with java jdk... maybe this has something to do with it too...

However first thing I did right now after I fixed it was downloading Android Studio again :D:D hope this time I've more luck xD
 

My Computer

Computer type
PC/Desktop
OS
Windows 7, 64 bit
Back
Top