Click here to Skip to main content
Licence CPOL
First Posted 27 Nov 2003
Views 94,106
Bookmarked 16 times

How to Clear CMOS

By | 27 Nov 2003 | Article
The two line code to clear cmos password or to clear whole cmos

Introduction

Add the following code in an MFC application or make Win32 Dynamic link library and then add the code. It works fine on Win9x only, it was not tested on XP/NT and hope it won't work on NT based tech.

The intension of this code is only for educational purposes. This code is for those who are too lazy to open their cabinet and remove the batter. No remote CMOS clearing routine is specified, so no questions should be posted for the same.  

How To Use It

Come on, you know how to... 

int __stdcall Clear_Cmos( )
{
_outp(0x70,0x2E);   //password will get cleared
_outp(0x71,0xFF); 

/* if you want to clear whole CMOS
use following code
for(int i=0;i<256;i++)  // whole cmos will get cleared
{
   _outp(0x70,i);
   _outp(0x71,i); 
}
*/
return 0;
}

History

  • 27th November, 2003: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Balkrishna Talele

Architect

India India

Member

Computer Engineer. Pune univ.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Questioncan u help me to write the same for XP PinmemberKSMH5:17 14 May '07  
AnswerRe: can u help me to write the same for XP Pinmemberjauming16:51 20 Sep '07  
Generalget with programatically [modified] PinmemberGupta Pavan17:51 10 Jan '07  
Generalstupid question Pinmembertoxcct7:00 6 Oct '04  
GeneralRe: stupid question Pinmemberdoublej3:21 2 Dec '04  
GeneralRe: stupid question Pinmembertoxcct20:23 2 Dec '04  
Generalworks great PinsussAnonymous7:42 27 May '04  
Generallong time ago! PinsussAnonymous10:43 12 Dec '03  
Generalthat wouldn't run on Windows Pinmemberlallous21:26 2 Dec '03  
GeneralRe: that wouldn't run on Windows PinmemberSreekanth Muralidharan23:47 12 Oct '04  
QuestionHow to know ??? PinmemberGeorgi3:46 2 Dec '03  
AnswerRe: How to know ??? PinmemberBalkrishna Talele18:39 2 Dec '03  
AnswerRe: How to know ??? PinsussAnonymous19:26 13 Apr '05  
QuestionCan I write a New password? PinmemberArielR0:17 2 Dec '03  
QuestionHow about system temperature... PinmemberThePuiu2:07 30 Nov '03  
AnswerRe: How about system temperature... PinmemberJohn M. Drescher4:01 30 Nov '03  
GeneralRe: How about system temperature... Pinmembersb14235:32 19 Feb '04  
GeneralRe: How about system temperature... PinmemberJohn M. Drescher5:38 19 Feb '04  
AnswerRe: How about system temperature... PinsussAnonymous19:28 13 Apr '05  
GeneralRoom for improvment... PinmemberJoel Holdsworth2:46 28 Nov '03  
GeneralRe: Room for improvment... PinmemberJohn M. Drescher3:17 28 Nov '03  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 28 Nov 2003
Article Copyright 2003 by Balkrishna Talele
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid