Problem: WMI StdRegProv Class can return junk characters when using the GetStringValue on windows 2003/XP/Vista and Windows 2008

Under a specific set of conditions, the StdRegProv GetStringValue method will return  a string of data from a random memory location.   The string value must have been created and valid data written into the key name.  Once the key name is cleared to a zero length, all subsequent reads will return the invalid data. To…


How to get the Terminal Service Account settings and Client Settings from the Terminal Server

You can use Win32_TSAccount And Win32_TSClientSetting WMI class to get the information but these classes returns some information in bit-wise operator and that needs to be convert in simple terms which are easily understandable to the user. Most of such scripts are used by the administrators in big organization and its really tough for them…

1

Reading all WINS IP addresses on a computer using Windows Scripting Host ( VBScript )

I recently worked with a developer who was working on a VBScript to enumerate all Windows Internet Name Service (WINS) IP addresses of a computer using the Win32_NetworkAdapterConfiguration WMI class. The developer was only able to enumerate the first two WINS IP addresses of a computer. The Win32_NetworkAdapterConfiguration class uses two properties to read WINS…

1

WScript.Quit( Value ) does not always match the error code environment variable %errorlevel% in the command processor ( batch file processing ) environment.

In the windows scripting host environment, the WScript.Quit method can be used to return an exit code to a calling process. In 99.9% of the cases, the value set with the WSCript.Quit method will be returned as expected. If you are running your script code in a command window, the value usually comes back in…

1