Option Explicit
?Define the variables to use.
Dim oWshShell, sNewValue
?Create an object representing the Windows graphical shell.
Set oWshShell = CreateObject(«Wscript.Shell»)
?Assign this key a value of 18 and assign this value to sNewValue.
sNewValue = oWshShell.RegWrite («HKLMSOFTWAREMicrosoftWindows 
NTCurrentVersionTerminal ServerCompatibilityApplicationsAppNameFlags», 18)
?Record the value and explanation in the current computer?s Application log.
oWshShell.LogEvent 4, «The value «& sNewValue & « indicates that this application is a Win32 
application referencing usernames.»

Поделитесь материалом с коллегами и друзьями