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

Windows 8.1 Professional x64

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 for2: Help: CMD BatFile Question
Thread Forum
Solved Thermal Paste Question..(Noobish Question) PC Custom Builds and Overclocking
Answer Question, Ask Question. Chillout Room
Solved Logitech 5.1 surround question and soundcard question IDT and Realtek Sound & Audio
Question?? To ALL.. General Discussion
ram question General Discussion
Question about being a IT Chillout Room

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 07:21 PM.
Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33