-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.wsf
32 lines (23 loc) · 874 Bytes
/
sample.wsf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<package>
<job id="manage-bde">
<script language="VBScript">
'NOTE: manage-bde.wsf has been replaced. Please use the replacement tool,
' manage-bde.exe, to perform BitLocker Drive Encryption management
' operations. This script is provided as a wrapper for backwards
' compatibility only.
strArgs = ""
For I = 0 to WScript.Arguments.Count - 1
strArgs = strArgs & " " & WScript.Arguments(I)
Next
strArgs = strArgs & " -legacy_Vista"
Set objShell = WScript.CreateObject("WScript.Shell")
Set objExecObject = objShell.Exec("%comspec% /c manage-bde.exe " & strArgs)
Do While Not objExecObject.StdOut.AtEndOfStream
WScript.StdOut.WriteLine objExecObject.StdOut.ReadLine()
Loop
Do While Not objExecObject.StdErr.AtEndOfStream
WScript.StdErr.WriteLine objExecObject.StdErr.ReadLine()
Loop
</script>
</job>
</package>