Skip to content

Commit e0d91a3

Browse files
changed script path to root
1 parent e3abd14 commit e0d91a3

32 files changed

+17065
-17062
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/Assembly
2+
/Modules
3+
/Utilities
Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
'******************************************************************************
2-
'*BypassCAC.vbs
3-
'*Author: Richard Tracy
4-
'*Data: 2 Nov 2016
5-
'*Description
6-
'*Changes registry key on remote computer to allow logon without CAC card
7-
'
8-
'*Usage:
9-
' *Prompts for computer name
10-
' BypassCAC.vbs
11-
'
12-
' *Auto
13-
' BypassCAC.vbs Computername
14-
'
15-
'*Changes: 11/02/2016: Prompt to state cancelled; added argument feature
16-
'******************************************************************************
17-
Option Explicit
18-
19-
Const HKEY_LOCAL_MACHINE = &H80000002
20-
Dim args,objReg, strComputer
21-
22-
Set args = Wscript.Arguments
23-
24-
If WScript.Arguments.Count = 1 Then
25-
strComputer = WScript.Arguments.Item(0)
26-
else
27-
strComputer = InputBox("Computer Name or IP Address","Disable CAC Authentication")
28-
End if
29-
30-
If IsEmpty(strComputer) Then
31-
'cancelled
32-
MsgBox "CAC Authentication cancelled"
33-
Else
34-
On Error Resume Next
35-
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
36-
objReg.SetDwordValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system", "scforceoption", 0
37-
If Err <> 0 Then
38-
MsgBox "Unable to disable CAC Authentication on " & strComputer
39-
Else
40-
MsgBox "CAC Authentication has been disabled on " & strComputer
41-
End if
42-
End if
43-
1+
'******************************************************************************
2+
'*BypassCAC.vbs
3+
'*Author: Richard Tracy
4+
'*Data: 2 Nov 2016
5+
'*Description
6+
'*Changes registry key on remote computer to allow logon without CAC card
7+
'
8+
'*Usage:
9+
' *Prompts for computer name
10+
' BypassCAC.vbs
11+
'
12+
' *Auto
13+
' BypassCAC.vbs Computername
14+
'
15+
'*Changes: 11/02/2016: Prompt to state cancelled; added argument feature
16+
'******************************************************************************
17+
Option Explicit
18+
19+
Const HKEY_LOCAL_MACHINE = &H80000002
20+
Dim args,objReg, strComputer
21+
22+
Set args = Wscript.Arguments
23+
24+
If WScript.Arguments.Count = 1 Then
25+
strComputer = WScript.Arguments.Item(0)
26+
else
27+
strComputer = InputBox("Computer Name or IP Address","Disable CAC Authentication")
28+
End if
29+
30+
If IsEmpty(strComputer) Then
31+
'cancelled
32+
MsgBox "CAC Authentication cancelled"
33+
Else
34+
On Error Resume Next
35+
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
36+
objReg.SetDwordValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system", "scforceoption", 0
37+
If Err <> 0 Then
38+
MsgBox "Unable to disable CAC Authentication on " & strComputer
39+
Else
40+
MsgBox "CAC Authentication has been disabled on " & strComputer
41+
End if
42+
End if
43+
4444
Set objReg = Nothing

0 commit comments

Comments
 (0)