Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Help: CMD BatFile Question

05 Jun 2010   #1

Windows 7
Help: CMD BatFile Question

Hey I have a Question with Windows bat file...

Is there a way to set a if statement for a system error 5

Echo off
Title Test
net user /add Frog 123456 (Giving System Error 5 if not ran as admin)
if system error 5 goto error
echo account made
echo ERROR Not Admin

I typed that quick so their might be bugs... but if someone can help please do...

My System SpecsSystem Spec
05 Jun 2010   #2


I think it's just:


which would of course be for exit code 5.
My System SpecsSystem Spec

Thread Tools

Similar help and support threads
Thread Forum
Question about HDD's
Is it true that you shouldn't go below 10% free or your data will become corrupt? Some people have told me that it will and then some people have said that is completely false :confused:
Hardware & Devices
Software RAID question, and NAS box software question
The more I try and learn about backups and safe storage the more questions I have. Here's my latest. I have two identical SATA III 1 Gb hard drives, designated "D Drive" under Win 7 64 bit Pro. They are under an Intel software RAID 1 on a Gigabyte GA-Z97X-Gaming 3 motherboard. All appears...
Hardware & Devices
Thermal Paste Question..(Noobish Question)
Hey guys, I recently purchased Corsair H40 that came with pre applied thermal paste. Before I placed the H40 sink on my processor, I applied a thin layer on the on the processor with Cooler Master thermal paste. So essentially I mixed the H40 pre applied thermal paste with the Cooler Master thermal...
PC Custom Builds and Overclocking
Answer Question, Ask Question.
First (hope you get the reference): In a world where a piano is a weapon, not a musical instrument, on what does Scott Joplin play "The Maple Leaf Rag"?
Chillout Room
Logitech 5.1 surround question and soundcard question IDT and Realtek
So my situation is unique lol i have a Dell inspiron n5010 laptop running Windows 7 ultimate 64 bit the soundcard for this is either IDT 92HD79B1, v., A01 or A03 i dont know what the default one mine came with is. Documentation i hope that helps ^ and the attatchment i...
Sound & Audio

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 20:29.
Twitter Facebook Google+