Our social:

How to protect our PC from batch file viruses ?

Hello friends..!!! welcome to Hack Hackers..!!

If you double click a batch file (.bat files) , it will run automaticallly . This can be dangerous as a batch file can contain harmful commands ans sometimes.worst still, if you use the single click option, one wrong click it is good bye windows . Now most power users would like to set edit as the default action.to best way to do that is go to explorer's folder option's file view tab to change the modify the default action.However ,  to add insult to injury , when you arrive there , you will find that the edit and set default buttons have been grayed out . This is a "feature" from Microsoft you might not appreciate.



To conquer our problem here, flare up your registry editor and go to HKEY_CLASSES_ROOT\batfile\shell\open Rename the open key to run, thus becoming HKEY_CLASSES_ROOT\batfile\shell\run.Double click  the edit flags binary value in HKEY_CLASSES_ROOT\batfile and enter 00 00 00 00 as the new value. 

Now , open explorer , click folder option from the view menu and select the file type tab,scroll down to the 'MS-DOS batch file' item,highlight it and click edit. You'll notice that the last three buttons ( Edit, Remove and Ser default ) are now enabled and that you can seect edit as the default action.

The above method off adding a .reg file to windows Registry is not very efficient as it pops up a dialog box,informing the uere that something is being done to the windows Registry.Instead , one should use registry DOS comands to add .reg fie to windows registry.

The following is a best method of adding a .reg file to the windows registry through batch file , without the user knowing about it.

ECHO @ECHO OFF >>c:\autoexec.bat
ECHO regedit /s c:\path\home.reg >> c:\autoexec.bat
This will add the following lines to the autoexec.bat file such that,the next time that windows boots they are executed.

REM Hide Everything
@ECHO OFF
REM /s stands for show no warnings or prompts
regedit /s c:\path\home.reg >> c:\autoexec.bat
Rem add the .reg file : c:\path\home.reg to c:\autoexec.bat


That's it friends..!!