-
-
Save kafkaesqu3/ea049e7c892ce13d27d67713b75c8e34 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE | |
strComputer = "." | |
strKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit" | |
Set objLocator = CreateObject("WbemScripting.SWbemLocator") | |
Set objReg = objLocator.ConnectServer(strComputer, "root\cimv2").Get("StdRegProv") | |
objReg.EnumKey HKLM, strKey, arrSubKeys | |
objReg.GetDWORDValue HKLM, strkey, "ProcessCreationIncludeCmdLine_Enabled", isenabled | |
If IsNull(isenabled) Then | |
retval = "Not Enabled" | |
Else | |
If isenabled > 0 Then | |
retval = "Enabled!" | |
Else | |
retval = "Not Enabled" | |
End If | |
End If | |
wscript.echo retval |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment