Tự động mã hóa EFS trong Windows XP, Vista hoặc Windows 7

G

Guest

Guest
(ThuVienBao.com) - ( 11:12 AM | 12/01/2012 ) *Trong bài viết dưới đây, chúng tôi sẽ hướng dẫn các bạn cách tạo script để tự động quá trình mã hóa theo chuẩn dữ liệu của tài khoản người dùng mỗi khi họ đăng nhập
*Mục đích của việc mã hóa theo cách này là bảo vệ những tài liệu, thông tin bí mật của cá nhân, tổ chức hoặc công ty, sau đó sao lưu chúng trên thiết bị lưu trữ bên ngoài.
Cụ thể, đoạn mã dưới đây sẽ thực hiện một số chức năng như:
*- Mã hóa toàn bộ dữ liệu trong thư mục My Documents, Outlook – đây cũng là nơi lưu trữ mặc định của file *.pst*.ost trong Outlook 2000, Outlook 2003.
*- Xuất toàn bộ dữ liệu output từ đoạn script vào 1 file khác, ở thư mục My documents của tài khoản người dùng, với tên cụ thể có dạng %computername%.efs
[h=2]Cách thực hiện trên Windows XP:[/h] REM @echo off
REM EFS MyDoc & Outlook EFS Encryption Script Version 1.1
REM http://www.groovyPost.com
REM
REM Script Created by MrGroove (groovyPost.com)
REM
REM This program is free software; not to be redistributed
REM without permission of groovyPost.com
REM
echo ***** >> "%userprofile%my documents%computername%.efs"
REM EFS Encryption Script Version 1.1
REM ======================================================
REM First, let’s create a file to store all the work were doing and for history
echo ****** >> "%userprofile%my documents%computername%.efs"
echo ****** >> "%userprofile%my documents%computername%.efs"
REM ======================================================
echo %date% %time% >> "%userprofile%My documents%computername%.efs"
REM ===================================================
REM Now were going to update all files to ensure no files are encrypted with old keys
cipher /u >> "%userprofile%My documents%computername%.efs"
REM ===================================================
REM Begin encryption of the "My Documents" folder
cipher /a /e /h /i /q /s:"%userprofile%My Documents" >> "%userprofile%My documents%computername%.efs"
REM ======================================================
REM Begin encrption of the "Outlook" folder where the OST and PST files are stored
cipher /a /e /h /i /q /s:"%userprofile%Local SettingsApplication DataMicrosoftOutlook" >> "%userprofile%My documents%computername%.efs"
REM ==================================================
REM More House Keeping
echo %date% %time% >> "%userprofile%My documents%computername%.efs"
echo ****** >> "%userprofile%My documents%computername%.efs"
echo ****** >> "%userprofile%My documents%computername%.efs"
REM ==================================================
REM ==================================================
REM All Done!
[h=2]Với Windows Vista, 7:*[/h] REM @echo off
REM EFS MyDoc & Outlook EFS Encryption Script Version 1.1
REM http://www.groovyPost.com
REM
REM Script Created by MrGroove (groovyPost.com)
REM
REM This program is free software; not to be redistributed
REM without permission of groovyPost.com
REM
echo ***** >> "%userprofile%documents%computername%.efs"
REM EFS Encryption Script Version 1.1
REM ======================================================
REM First, let’s create a file to store all the work were doing and for history
echo ****** >> "%userprofile%documents%computername%.efs"
echo ****** >> "%userprofile%documents%computername%.efs"
REM ======================================================
echo %date% %time% >> "%userprofile%documents%computername%.efs"
REM ===================================================
REM Now were going to update all files to ensure no files are encrypted with old keys
cipher /u >> "%userprofile%documents%computername%.efs"
REM ===================================================
REM Begin encryption of the "Documents" folder
cipher /a /e /h /i /q /s:"%userprofile%Documents" >> "%userprofile%documents%computername%.efs"
REM ======================================================
REM Begin encrption of the "Outlook" folder where the OST and PST files are stored
cipher /a /e /h /i /q /s:"%userprofile%Local SettingsApplication DataMicrosoftOutlook" >> "%userprofile%documents%computername%.efs"
REM ==================================================
REM More House Keeping
echo %date% %time% >> "%userprofile%documents%computername%.efs"
echo ****** >> "%userprofile%documents%computername%.efs"
echo ****** >> "%userprofile%documents%computername%.efs"
REM ==================================================
REM ==================================================
REM All Done!
Chúc các bạn thành công!
(T.Anh GroovyPost)
(Theo quantrimang)
 
Back
Top