首先,为了照顾初入电脑的新手,widows密码一般在控制面板,选择安全管理,点击管理员身份,旁边就会有创建密码,点击创建之后即可。
第二,这是widows基础密码开机效果图,这个页面并不是百分之百可以保护电脑,如果电脑管理员还有另外一身份,也是可以进入,这里姑且不提,下面介绍令一种方法。
widows如何设置双层保护密码
第三,首先,点开开始菜单栏直接点击运行,输入cmd,或者在开始菜单中选择程序,在选择附件,选择命里提示符也是可以的。
第四,在键入第三步时,电脑会出现如下页面,这个黑漆漆的窗口就是命令提示符,在里面不仅可以玩指令,而且也可以给电脑上双层密码。
widows如何设置双层保护密码
第五,在打开这个黑漆漆的窗口之后,我们直接输入syskey,会出现如下页面,需要注意的是,这时候,我们并不是点击确定,而是要点击这个更新,点击这个确定只会保留我们以前 *** 作。
第六,在点更新之后,会出现如下页面,在这个页面我们直接选择密码,切换到上一步,直接输入密码点击确定即可,这时候,就会出现更新成功,我们以后开机就需要输入刚刚设定的密码了,从而与widows基础密码实现双层保护。
#include <reg52.h>#define uint unsigned int
#define uchar unsigned char
#define BIN(a,b,c,d,e,f,g,h) ((a<<7)+(b<<6)+(c<<5)+(d<<4)+(e<<3)+(f<<2)+(g<<1)+(h<<0))
//下面的code表示数组存放在ROM中,因为这个数组的值不需要改写
uchar code KeyCode[16]={15,14,12,8,30,28,24,16,60,56,48,32,120,112,96,64}//值为m*(n+1)的乘积,用于Key()
uchar dis[6]
msdelay(uint x)//延时子函数
{uchar j
while(x--)
{for(j=0j<125j++){}
}
}
//键盘子程序一,键盘值与数组值对比得到
uchar Key(void)
{uchar temp,m,n,i,j,matrix,k
P1=0xF0 /*行线电平为高,列线为低*/
temp=P1&0xf0
if (temp==0xf0) return(16)/*行仍为高,无按健,退出*/
else msdelay(10)
for(i=1i<16i=i*2)
{m=i
for(j=1j<16j=j*2)
{n=(~j)&0x0f
P1=(m<<4)|n/*m为P1的行值由i循环得到,n为列值,由j循环并取反得到*/
temp=P1&0xf0
if (!temp)
{do{temp=P1&0xf0}while(!temp)
matrix=m*(n+1)/*为避免乘积重复,n+1*/
for(k=0k<16k++){if (matrix==KeyCode[k]) return(k)} //KeyCode:见前
return(16)
} //if loop
}//j loop
}//i loop
}//Key end
//用Switch...case语句得到键盘值*/
uchar Key1(void)
{uchar temp,m,n,i,j,matrix
P1=0xF0 /*行线电平为高,列线为低*/
temp=P1&0xf0
if (temp==0xf0) return(16) /*行仍为高,无按健,退出*/
else msdelay(10)
for(i=1i<16i=i*2)
{m=i
for(j=1j<16j=j*2)
{n=(~j)&0x0f
P1=(m<<4)|n/*m为P1的行值由i循环得到,n为列值,由j循环并取反得到*/
temp=P1&0xf0
if (!temp)
{do{temp=P1&0xf0}while(!temp)
matrix=m*(n+1)
switch(matrix) //此方法的基本思路:
{case 15:return(1)break //由循环得到的m,n值赋于P1端口实现逐个键扫描
case 14:return(2)break //同时由m,n+1的值相乘得到对应键点de的积
case 12:return(3)break //m*(n+1)值扫描键点对应而得出键值
case 8:return(4)break //
case 30:return(5)break //
case 28:return(6)break //
case 24:return(7)break //
case 16:return(8)break
case 60:return(9)break
case 56:return(0)break
case 48:return(10)break
case 32:return(11)break
case 120:return(12)break
case 112:return(13)break
case 96:return(14)break
case 64:return(15)break
default:return(16)
} //switch end
} //if loop
}//j loop
}//i loop
}//Key end
//依次扫描16个按键
uchar Key2(void)
{uchar temp
P1=0xF0 /*使P1=1111 0000,行线电平为高,列线为低*/
temp=P1&0xf0
if (temp==0xf0) return(16) /*读P1=1111 xxxx,表示行仍为高,无按健,退出(x表示不关心)?/
else msdelay(10)
P1=0x1e /*P1=0001 1110,行一为高,列一为低,扫描第一个按键*/
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(1)}
P1=0x1d /*P1=0001 1101,行一为高,列二为低,扫描第二个按键,下面扫描其余按键*/
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(2)}
P1=0x1b
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(3)}
P1=0x17
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(4)}
P1=0x2e
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(5)}
P1=0x2d
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(6)}
P1=0x2b
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(7)}
P1=0x27
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(8)}
P1=0x4e
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(9)}
P1=0x4d
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(0)}
P1=0x4b
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(10)}
P1=0x47
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(11)}
P1=0x8e
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(12)}
P1=0x8d
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(13)}
P1=0x8b
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(14)}
P1=0x87
temp=P1&0xf0
if (!temp) {do{temp=P1&0xf0}while(!temp)
return(15)}
return(16) //扫描all按键都未按下,则输出16
}//Key2 end.
////////时钟中断显示子程序
void T0_int() interrupt 1
{static uchar i
if (i==6){i=0}
P0=5-i
P0=P0|(dis[i]<<4)
i++
TL0=0
TH0=252}
void distri(uint disnum)
{uint temp
dis[0]=0
dis[1]=disnum/10000
temp=disnum%10000
dis[2]=temp/1000
temp=temp%1000
dis[3]=temp/100
temp=temp%100
dis[4]=temp/10
dis[5]=temp%10
}
Main()
{uchar KeyVal,i=0
TMOD=0x01
IE=0x82
TH0=252
TL0=0
TR0=1
distri(0)
do{
KeyVal=Key()
if (KeyVal!=16) dis[1]=KeyVal//注意:当有按键时才赋于显示位dis[1],否则出错,请分析!
}while(1)
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)