Computer ShutDown / Restart When You Type cmd In Run To Launch Command Prompt

by Rohit Khurana on March 29, 2009



One of our reader reported us a common virus problem which causes your computer to restart every time he try to launch command prompt. Below is the what he had sent us in the mail to contact us.

My Computer gets shutdown when I type cmd in run prompt to start command prompt, I know this is a virus problem please help me solve this problem.

This is a virus activity which prevents to use command prompt on the infected machine, this virus is called PC-OFF.bat trojan which turns off or shutdown your computer when ever you try to use command prompt by any means.


The infected computer restarts on opening command prompt.


This PC-OFF.bat virus creates the following files

  • password_viewer.exe
  • bar311.exe
  • pc-off.bat

at the following locations

  • c:\windows\bar311.exe
  • c:\windows\password_viewer.exe
  • c:\windows\
  • c:\windows\pc-off.bat

Another variant of the this virus is recognized as bar311.exe virus A.K.A. winzip123 which will have almost the same symptoms and when ever you boot your Windows Xp computer in safe mode it will say a message Thank You!!! Password:Winzip123


Let’s find out the fix to remove this shutdown virus completely from computer.


1. Open Task Manager by pressing Ctrl+Shift+Esc, click the process tab and locate the process named ‘password_viewer.exe‘ or ‘bar311.exe‘ or ‘‘ one by one and right click  and select ‘End Process’   


2. Open Start Menu >> Run, type regedit and press Enter key or OK button


3. Navigate to the following path



4. Locate the key named Userinit in right pane

"Userinit" = C:\WINDOWS\system32\userinit.exe,bar311.exe"
double click and remove the text ‘bar311.exe’ from the above
"Userinit" = C:\WINDOWS\system32\userinit.exe,"
double click and remove the text ‘’ from the above
"Userinit" = C:\WINDOWS\system32\userinit.exe,password_viewer.exe"
double click and remove the text ‘password_viewer.exe’ from the above


Note: Please make sure after editing the above Userinit key value it should be only

C:\WINDOWS\system32\userinit.exe (as shown in the image below)











5. Navigate to the following path now

HKEY_CURRENT_USER \software\microsoft\windows\currentversion\explorer\advanced

Change Value of the following registry Key’s  :-
"Hidden"=dword:00000001 (1) – Change to ‘1’
"HideFileExt"=Dword:00000000 (0) – Change to ‘0’
"ShowSupperHidden"=Dword:00000001 (1) – Change to ‘1’


6. Navigate to the following registry path

HKEY_CURRENT_USER \software\microsoft\Command Processor


Find the registry key named autorun, right click and delete this key. The value of the key would be autorun=c:\windows\pc-off.bat


7. Open notepad and type the following commands

@echo off
del /a /f c:\windows\bar311.exe
del /a /f c:\windows\password_viewer.exe
del /a /f c:\windows\
del /a /f c:\windows\pc-off.bat


Save it as remove-pc-off-virus.bat and double click to run it. Or just download this batch file here and run it by double click.


8. Search for bar311.exe OR password_viewer.exe OR OR pc-off.bat and delete these files where ever found on your computer.


9. That’s it, Enjoy the pc off virus is now completely removed from your computer.

If you like this article or this article helped you, you can +1 to recommend this article on google plus.

You can follow us on Twitter or join our Facebook Fan Page. If you have a question to ask us, submit your question at Answers By Trouble Fixers.

Looking for something else? Search here :

{ 18 comments… read them below or add one }

Max April 5, 2009 at 7:55 pm

Thanks for your manipulation, working very well….


Sarfaraj Khan April 6, 2009 at 2:05 am

Hey this is nice idea and very cool. Enjoy with trouble fixer.
Rohit Khurana is very brilliant guy. I am very thankful to Rohit.

mwape April 8, 2009 at 7:17 am

Hey Guys
This is some cool stuff you got here,very great idea was very very helpful keep up the good stuff and post more ideas


MarlonS April 21, 2009 at 6:31 pm

Thanks a lot, the fix worked very well. Great guide!

odie April 28, 2009 at 10:18 am

Sir i salute you my savior Mr.Rohit glad i fixed it up using your guidelines.Thanks for the easy way how i remove that virus.More power!

Chester May 26, 2009 at 8:19 am

i tried your steps… but still..
when i run the saved file the remove-pc-off-virus.batt my computer restarts again… u am so worried pls help me… i tried your steps so many times… and still the same thing happens… my computer shuts down automatically… pls.. pls.. help me… i’m cheester from the Philippines…

Sherdil Rana June 22, 2009 at 5:05 pm

My Dear Friend Chester,

The same thing happened to me. What I did was to skip step 7 and proceed straight away to step 8.

go to:


there, search for

* password_viewer.exe
* bar311.exe
* pc-off.bat

anything and everything you see with those names in any format or type, DELETE them!!!

Go back to step 7 and you will see that the problem would have been fixed.

To make it 100% certain, type CMD using Run found in the start up menu.

If your computer doesn’t restart, Congratulate yourself for a job well done! 😀

CJ June 24, 2009 at 12:32 am


brian July 7, 2009 at 5:43 pm

you guys are great!!! thanx a lot! keep up the good work! =)

Jeewan October 26, 2009 at 1:53 am

Thank alot. But you know Nowdays another Virus file “iph.exe” also prompt same shutdown warning. So It’s the same process to get ride of “iph.exe” too, Just keep “iph.exe” or remove “iph.exe” insted of other.

Jeewan October 26, 2009 at 1:58 am

Another Useful command

@echo off
attrib -s -r c:\windows
attrib -s -r E:\
del /a /f c:\windows\bar311.exe
del /a /f c:\windows\password_viewer.exe
del /a /f c:\windows\
del /a /f c:\windows\pc-off.bat
del /a /f c:\windows\iph.exe
del /a /f c:\windows\autorun.inf

jenn_gold January 2, 2010 at 2:36 pm

thanks! it works!

romel January 25, 2010 at 12:02 pm

thanks rohit, your solution really works..keep on sharing your knowledge dude!!

Jonnar May 19, 2010 at 10:39 am

thanks a lot men, it works from me.

michael roche June 29, 2010 at 5:35 pm

thanks bro for your help

manoj July 1, 2010 at 9:05 am

i seareched fo those files in my comp but couldn’t find any…but still wen i click on comand processr or type cmd on run n click enter my computer restarts…pls help pls…

Rohit July 1, 2010 at 11:10 am

here is the solution to the restart problem which occurs on opening command prompt –

manoj July 2, 2010 at 5:03 pm

i did all these steps but still its restartin g wen i open comand prompt…i even searched for them but didn find ne file in those names but i still have the same problem with comand prompt

Leave a Comment

Previous post:

Next post:

© TroubleFixers – All about fixing computer troubles2007-2017 . All Rights Reserved.