Enumerating Environment variables

topic: 

One of the way to enumerate the Environment Variables is by accessing _environ global variable. The GetEnvironmentStrings function provides another way by returning a pointer to the environment block of the calling process. It can also be done using WMI Win32_Environment Class.

Get number of jobs in print queue

The number of jobs in print queue can be retrieved by simplified version of Enumerating jobs in print queue

Enumerating jobs in print queue

Enumerating jobs in a print queue can be done with

How to delete all Print Jobs from a print queue

All jobs from a print queue can be deleted with

Check if EXE is running and optionally terminate it

topic: 

Changing Windows default printer

Sometimes it's necessary to change Windows default printer from within VFP application. It can be done with Windows API, WSH or WMI.