tự động set chế độ security-low khi mở file

Liên hệ QC

kietbui

Thành viên mới
Tham gia
23/5/07
Bài viết
45
Được thích
57
khi viết các chương trình gởi cho người khác sử dụng có chứa macro thì phải yêu cầu set excel chế độ security-low, hơi phiền phức. Trong diễn đàn đã có hướng dẫn tạo add-in setlow.xla nhưng đó là cài máy mình, còn code cài chung file khi mở thì không chạy được khi e-xcel đang ở chế độ security-high. Vậy các bạn có thể hướng dẫn lại cách cài code trong file để khi file mở lên là có thể chạy macro dù chế độ security là high.
 
Oh, nếu mà set được thì thành Virus / hay hack mất rùi,

+ Tuy vậy vẫn có cách là dùng digitally signing cho macro, bạn thử tìm hiểu HD sau, xem sao. Mong các cao thủ khác sẽ giúp bạn,

theo office.microsoft.com đã viết:
Digitally signing a macro

You can use the program Selfcert.exe to sign macros or templates you create for your own personal use. Certificates created for use on your own computer are accepted only for the computer the certificate was created on.
Selfcert.exe calls Makecert.exe; both programs are available with Office in the Office 2003 folder and are not available with the Microsoft Office 2003 Editions Resource Kit. However, signing a macro, template, or file with Selfcert.exe does not provide a high enough level of authentication to provide reliable tracking of the source of the file back to its developer. Therefore, if a file you sign with a signature created from Selfcert is distributed to other users, they will not be able to accept your certificate if they are running High security, because the certificate does not have a high enough security level to authenticate who you are. Only a certificate issued by a certificate authority can be used to provide a distributable certificate and signature to others and still pass through Medium and High security levels in Office.
There are limitations to the deployment of Selfcert.exe certificates applied to a macro when macro security is set to High:
  • Setting security to Low and then running the macro does not register the certificate in the trusted sources list. Security must be set to Medium or High before any certificates are posted to the trusted Trust Publishers list. In cases where security is set to High on all computers, a Selfcert.exe-signed macro can be deployed, but it does not have a secure enough certificate for use by other users who are running with the High security level. Only a certificate issued by a certificate authority can be used to provide a distributable certificate and signature to others and still pass through Medium and High security levels in Office
  • Selfcert.exe-issued certificates are not managed by a certificate authority and do not provide for certificate revocation checking.
  • Selfcert.exe does not provide a certificate of trust with a traceable signature.
 
Upvote 0
Chào các bác, em đã vào http://support.microsoft.com/kb/q217221/ thấy có hướng dẫn về SelfCert.exe nhưng chỉ là quyền đăng nhập Sign in hay gì đó tương tự vậy thôi. Em đã làm theo hướng dẫn và đăng ký được rồi. Khi vào VBA của Excel (Tools -> Digital Signature) chọn vào Choose... bạn có thể đăng ký tên mình trong mục Certificate name:.. ; nhưng không biết nó có tác dụng gì khi chạy Macro mà bị thuộc tính High cãn trở, xin các bác nói thêm. Còn trong bảng tính Excel (Tools -> Macro -> Security) có một thẻ là Trusted Publishers. Vậy nó được dùng làm gì và sử dụng như thế nào vậy các bác, ạ!
 
Lần chỉnh sửa cuối:
Upvote 0
CTyCongNgheTinHocNhaTrang đã viết:
+Các cấp độ bảo mật bao gồm: - Very High: Chỉ các macro có trong danh sách macro được thực thi. - High: Chỉ có những macro có chứng chỉ số xác nhận mới được thực thi và khi đó bạn có thể thêm chúng vào danh sách macro sau khi đã đảm bảo rằng chúng không chứa virus. Đây là cấp độ bảo mật mặc định. - Medium: Bạn có thể tuỳ chọn thực thi hay không các macro. - Low: Tại cấp độ bảo mật này, tất cả các macro đều được thực thi khi bạn mở tập tin. +Tuỳ chọn Trust all installed ađ-ins and templates Bạn có thể bỏ thực thi tất cả các macro bằng cách thiết lập cấp độ bảo mật ở cấp Very High và loại các macro có trong danh sách thông qua lệnh Tools/Macro/Security, trên nhãn Trusted Publisher, bỏ chọn mục Trust all installed ađ-ins and templates. Trust all installed ađ-ins and templates là một tuỳ chọn được thiết lập mặc định trong nhãn Trusted Publishers của hộp thoại Security. Các cấp độ bảo mật ở trên có tác động qua lại với tuỳ chọn này.
Em tìm được trang này có viết như trên. Vậy theo các bác "Chỉ các Macro có trong danh sách macro được thực thi" là sao? Và làm sao để Macro của mình có thể nằm trong danh sách ấy vậy? Còn bảng Trusted Publisher nó sẽ chứa gì trong đó sao lâu nay em vẫn không thấy nó hoạt động gì hết vậy????? Các bác ơi xin giải đáp thắc mắc giùm đi... ===\.
 
Lần chỉnh sửa cuối:
Upvote 0
Chào các bác nha, Em chỉ có thể làm cho Macro chạy được trên lệnh High thôi còn Very High thì sao?? Nhưng cách mở Macro kiểu này mắt công cho người dùng quá vì cứ mỗi khi mở lại từ đầu trên máy mới thì hay xuất hiện cửa sổ Security Warning và còn phải chọn vào mục Always trust macros from this publisher này nữa. Nhưng một số người họ vô ý có thể quên hoặc nhấn vào nút Disable Macros thì cũng nhưng không?!? Vả lại cũng bị thằng Very High khống chế nữa mà?? Làm sao đây các bác ơi giúp em đi chứ... (giúp người phải giúp cho chót chứ)...
 
Lần chỉnh sửa cuối:
Upvote 0
Web KT
Back
Top Bottom