Snippets to Go


15 results found for Snippets to Go, displaying items 1 - 15

Function Lets You Write Less Code to Retrieve WMI Data This article is only available to VIP subscribers.  Sign up now and get instant access!

If you use the GetWmiProperty function, you'll spend less time writing your WMI scripts.

Windows IT Pro

Function Provides Another Way to Determine Leap Years This article is only available to VIP subscribers.  Sign up now and get instant access!

In scripting, there’s more than one way to accomplish a task. Here’s one way to determine whether a certain year is a leap year.

Windows IT Pro

The Delay Function Extends WSH’s Sleep Method This article is only available to VIP subscribers.  Sign up now and get instant access!

This user-defined function works like the WScript.Sleep method but wakes the script up early if necessary.

Windows IT Pro

Determine a Script's Path On the Fly This article is only available to VIP subscribers.  Sign up now and get instant access!

The ScriptPath function determines a script's path while the script is running so that the script can, for example, use a .wsc file that's not registered on the computer.

Windows IT Pro

LeapYear Function Might Have You Leaping for Joy This article is only available to VIP subscribers.  Sign up now and get instant access!

This VBScript function lets you determine whether a given year is a leap year.

Windows IT Pro

The Write Stuff This article is only available to VIP subscribers.  Sign up now and get instant access!

This simple VBScript function lets you write a string to a file without making you jump through hoops.

Windows IT Pro

Function Determines the Script Host On the Fly This article is only available to VIP subscribers.  Sign up now and get instant access!

Determining the script host is important when a WSH script uses the WScript object’s Echo method repeatedly or uses certain WScript object properties. Here’s a function that determines the script host while the script is running.

Windows IT Pro

An Alternative Approach for Pinging Computers This article is only available to VIP subscribers.  Sign up now and get instant access!

There are many ways to check a computer for connectivity in a script. Here’s a function that pings computers by using WMI’s Win32_PingStatus object.

Windows IT Pro

Functions to Obtain SIDs and Usernames This article is only available to VIP subscribers.  Sign up now and get instant access!

Here are two functions that let you obtain a user’s SID and, conversely, obtain the username associated with a SID.

Windows IT Pro

Function Plays Sleuth and Searches for Signs This article is only available to VIP subscribers.  Sign up now and get instant access!

Although there's no officially endorsed way for WSH to detect the .NET runtime library, here’s how you can use WSH and the DotNetVersion function to look for signs of the library’s presence.

Windows IT Pro

Use the FileToArray Function to Read a Text File Into an Array

Reading a text file into an array has its advantages, including being able to iterate through a file multiple times without having to close it and open it again

Windows IT Pro

A Worry-Free Way to Ping Remote Computers This article is only available to VIP subscribers.  Sign up now and get instant access!

Instead of using ping.exe, which has some drawbacks, to ping remote computers, you can use the Alive function in your .vbs code and IsAlive.cmd in your .cmd code.

Windows IT Pro

Snippets to Go This article is only available to VIP subscribers.  Sign up now and get instant access!

In this month’s column, learn how to use the IIf function and the GetToken function in your VBScript code.

Windows IT Pro

A VBScript Version of VBA’s IIf Function This article is only available to VIP subscribers.  Sign up now and get instant access!

Just like VBA’s built-in IIf function, the VBScript user-defined IIf function evaluates an expression and returns a specific value, depending on whether the expression evaluates to True or False.

Windows IT Pro

Use the GetToken Function to Parse Delimited Lines This article is only available to VIP subscribers.  Sign up now and get instant access!

Like cmd.exe’s For /f command, the GetToken function lets you parse a line for a specific token in VBScript code.

Windows IT Pro

Add these Headlines to your Website







 

ADS BY GOOGLE