网上有很多加密工具,你可以查一下,式者可以试下我自已编的批处理,不过只隐藏功能。
把以下代码复制,然后在文本文件中粘贴,另存为ABC.BAT
@echo off
:top
echo.
set cc=0&set aa=0&set p1=0&set p2=0&set p=0
set q1=0&set q2=0&set q3=0&set q4=0&set q5=0
set pass=0&set pp=0&set vv=0&set un=0&set qq=0
set mdd=0&set ff1=0&set ff2=0&set ff3=0&set ff4=0&set ff5=0
set jj1=0&set jj2=0&set jj3=0&set jj4=0&set jj5=0
set god=0&set cl=0
set bb=:\recycled\1.{21EC2020-3AEA-1069-A2DD-08002B30309D}\MYCB4E~1
echo.
echo $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
echo.
echo 自编私人磁盘
echo.
echo $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
echo.
if exist c%bb% (set q1=c) else set q1=.
if exist d%bb% (set q2=d) else set q2=.
if exist e%bb% (set q3=e) else set q3=.
if exist f%bb% (set q4=f) else set q4=.
if exist g%bb% (set q5=g) else set q5=.
if /i %q1%==c goto umd3
if /i %q2%==d goto umd3
if /i %q3%==e goto umd3
if /i %q4%==f goto umd3
if /i %q5%==g goto umd3
echo 你PC机不存在私人磁盘请创建
echo.
goto umd4
:umd3
for %%a in (%q1% %q2% %q3% %q4% %q5%) do if %%a neq . echo 你PC机已存在的私人磁盘有: %%a
echo.
:umd4
echo 请选择:
:tru
color 97
echo ####### 1.创建私人磁盘 ########
echo ####### 2.打开我的磁盘 ########
echo ####### 3.关闭我的磁盘 ########
echo ####### 4.删除私人磁盘 ########
echo.
echo.
set /p cc= 输入你想做的(1,2,3,4):
if /i %cc%==1 goto m
if /i %cc%==2 goto open
if /i %cc%==3 goto co
if /i %cc%==4 goto del
cls
echo 你的选择有误请重新输入
echo.
goto tru
rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~建盘~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:m
color 21
echo.
echo.
for /f "tokens=1 delims==: " %%a in ('subst') do @subst %%a: /d
for %%a in (c d e f g h i j k l m n w x y z) do for /f "tokens=2 delims=-: " %%i in ('fsutil fsinfo drivetype %%a: ^|find /i "固定"') do echo 你现有的分区:%%a
:kkr
echo.
set /p aa= 要在那个分区创建私人硬盘:
for /f "tokens=1 delims=-: " %%a in ('fsutil fsinfo drivetype %aa%: ^|find /i "固定"') do if /i %%a==%aa% goto ok1
echo.
echo 你的输入有误
goto kkr
:ok1
if exist %aa%:\recycled goto ok
md %aa%:\recycled
:ok
echo [.ShellClassInfo] >%aa%:\recycled\desktop.ini
echo CLSID={645FF040-5081-101B-9F08-00AA002F954E} >>%aa%:\recycled\desktop.ini
md %aa%:\recycled\1.{21EC2020-3AEA-1069-A2DD-08002B30309D}
if exist %aa%%bb% goto open1
md %aa%:\recycled\1.{21EC2020-3AEA-1069-A2DD-08002B30309D}\my..\\\\\\
attrib +a +s +h %aa%:\recycled
attrib +a +s +h %aa%:\recycled\1.{21EC2020-3AEA-1069-A2DD-08002B30309D}
echo.
echo.
echo.
rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~建密码~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:rp
echo %p1% >%aa%%bb%\pass.ini
set /p p1= 输入打开密码:
set /p p2= 请再次输入:
if /i %p1%==%p2% goto pok
echo.
echo 两次输入不一至,请重新输入
echo.
goto rp
:pok
set p=%p1%
echo %p% >%aa%%bb%\pass.ini
attrib +r +a +s +h %aa%%bb%\pass.ini
echo.
echo 密码为 %p%
echo.
echo 私人硬盘创建成功
echo 请按任意键打开
pause
goto oo
:open1
cls
echo 私人磁盘已存在,请重新选择
goto tru
rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~打开磁盘~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:open
set vv=3
cls
color 0f
echo.
echo.
if exist c%bb% (set q1=c) else set q1=.
if exist d%bb% (set q2=d) else set q2=.
if exist e%bb% (set q3=e) else set q3=.
if exist f%bb% (set q4=f) else set q4=.
if exist g%bb% (set q5=g) else set q5=.
if /i %q1%==c goto umd
if /i %q2%==d goto umd
if /i %q3%==e goto umd
if /i %q4%==f goto umd
if /i %q5%==g goto umd
echo 你PC机不存在私人磁盘请重选
goto tru
:umd
echo 你PC机已存在的私人磁盘有:%q1% %q2% %q3% %q4% %q5%
echo.
set /p aa= 输入要打开的磁盘:
:pr
if /i %q1%==%aa% goto pass
if /i %q2%==%aa% goto pass
if /i %q3%==%aa% goto pass
if /i %q4%==%aa% goto pass
if /i %q5%==%aa% goto pass
set /p aa= 你的输入有误请重新输入:
goto pr
:pass
set /p pass= 输入%aa%盘的密码:
for /f %%p in ('type %aa%%bb%\pass.ini') do set pp=%%p
if /i %pass%==%pp% goto oo
set /a vv=%vv%-1
echo 密码不正确,还有次数%vv%,请重新输入
if /i %vv%==0 goto end
goto pass
:oo
for /f "tokens=1,4 delims==: " %%a in ('subst') do if /i %aa%==%%b subst %%a: /d
for %%a in (c d e f g h i j k l m n o p q r s t v w x z) do for /f "tokens=2 delims=-: " %%i in ('fsutil fsinfo drivetype %%a: ^|find /i "没"') do set un=%%a
subst %un%: %aa%%bb%
start explorer %un%:
goto end
rem ~~~~~~~~~~~~~~~~~~~~~~~~~~关闭磁盘~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:co
cls
echo.
for /f "tokens=2 delims=: " %%a in ('subst ^|find /i "\"') do if %%a==\ goto ok2
cls
echo.
echo 没打开私人磁盘
echo.
goto tru
:ok2
for /f "tokens=1,4 delims==: " %%a in ('subst') do echo 你已打开的私人磁盘有%%a在(%%b盘)
echo.
set /p cl= 输入你要关闭的私人磁盘(输入all全关):
for /f "tokens=1 delims==: " %%a in ('subst') do if /i %cl%==%%a subst %%a: /d
for /f "tokens=1 delims==: " %%a in ('subst') do if /i %cl%==all subst %%a: /d
echo.
echo 私人磁盘已关闭,
echo.
set /p abc= (返回主菜单请按r)继续删除请按 y 否则按任意键退出:
cls
if /i %abc%==y goto co
if /i %abc%==r goto top
goto end
ren ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~删除私人磁盘~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:del
cls
color c0
echo.
echo.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@ 警告 @@@@@@@@@@@@@@@@@@@@@@@@@
echo.
echo 私人磁盘一但删除,盘内数据也将消失
echo.
echo.
pause
:ddd
echo.
if exist c%bb% (set q1=c) else set q1=.
if exist d%bb% (set q2=d) else set q2=.
if exist e%bb% (set q3=e) else set q3=.
if exist f%bb% (set q4=f) else set q4=.
if exist g%bb% (set q5=g) else set q5=.
if /i %q1%==c goto umd2
if /i %q2%==d goto umd2
if /i %q3%==e goto umd2
if /i %q4%==f goto umd2
if /i %q5%==g goto umd2
echo.
echo 你PC机不存在私人磁盘请重选
echo.
pause
goto tru
:umd2
for %%a in (%q1% %q2% %q3% %q4% %q5%) do if %%a neq . echo 你PC机已存在的私人磁盘有:%%a
echo.
echo.
set p=.
set /p aa= 输入要删除的盘(要全删除输入all):
if %aa%==all goto delo
for /f "tokens=1,4 delims==: " %%a in ('subst') do if /i %aa%==%%b subst %%a: /d
rd /s /q %aa%:\recycled\1.{21EC2020-3AEA-1069-A2DD-08002B30309D}
echo.
echo %aa%盘所在的私人磁盘已删除
echo.
echo.
set /p god= (返回主菜单请按r)继续删除请按y, 否则按任意键退出:
cls
if /i %god%==y goto ddd
if /i %god%==r goto top
goto end
:del0
for /f "tokens=1 delims==: " %%a in ('subst') do @subst %%a: /d
for %%a in (%q1% %q2% %q3% %q4% %q5%) do if %%a neq . @rd /s /q %%a:\recycled\1.{21EC2020-3AEA-1069-A2DD-08002B30309D}
echo.
echo 所有私人磁已删除
echo.
echo
set /p cba= (返回主菜单请按r),否则按任意键退出:
if %cba%==r goto top
:end
我一般就是右键单击该文件,添加到压缩包,高级,设置密码,确定就可以了。