如何使用vbscript加密EFS文件

本文关键字:EFS 文件 加密 vbscript 何使用 | 更新日期: 2023-09-27 17:52:42

是否可以使用vbscript以编程方式加密文件(使用EFS) ?有什么EFS API可以在windows 7上与c#一起使用吗?

如何使用vbscript加密EFS文件

我把你的答案翻译成c#:

WshShell sh1 = new WshShell(); 
var retval = sh1.Run("CIPHER /E /S:" & strDir, 0, True); 

还没有答案!!同时,一个选择是使用以下脚本

Dim strDir, objShell, FSO, WshShell
strDir = "D:'TestFolder"
Set objShell = CreateObject("Shell.Application")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
retval = WshShell.Run("CIPHER /E /S:" & strDir, 0, True)
MsgBox("Success")