Tag Archives: vbscript

Send notification email from SCCM 2012 Task Sequence

I wanted to be able to send an email from a step in a SCCM 2012 OS Deployment (OSD) task sequence. This was so that I could be notified when the task sequence had completed successfully. The account used to … Continue reading

Rate this:

Posted in sccm, Scripting, Windows | Tagged , , , , , , , , , | Leave a comment

Script comparison: CMD, VBScript, Powershell

This was going to be a short scripting exercise for a new member of staff, but has been ditched due to time constraints. I’d written some sample scripts to see how long it’d take, so thought I’d post them as … Continue reading

Rate this:

Posted in PowerShell, Scripting | Tagged , , , , , , , , , , , | Leave a comment

VBScript error -2147023080

Had this when trying to copy a file using a Scripting.FileSystem object’s .CopyFile method. Could find no information on error -2147023080 but trying the same using the command prompt’s copy command yielded the following: Not enough quota is available to process … Continue reading

Rate this:

Posted in Scripting, Windows | Tagged , , , | Leave a comment

VBScript: Delete registry values that contain a backslash in the name

VBscript is great for most stuff, but occasionally you try and do something and it can’t handle it. I came across another one of these yesterday, trying to remove some old network printer connections. I ended up having to try … Continue reading

Rate this:

Posted in Scripting | Tagged , , , , , , | Leave a comment

Make mailto links open Yahoo mail on Windows

This isn’t perfect, but it’s better than nothing. I’m using Windows 7, but this should work (with a few tweaks) on other versions too. You do NOT need to install any additional software, so Yahoo Toolbar or Yahoo Messenger are … Continue reading

Rate this:

Posted in Scripting, Windows | Tagged , , , , , , , , , , , | 10 Comments

VBScript function to get folder owner

This VBScript function parses the output of the DIR /Q command to find the owner of the specified folder. It demonstrates using a WScript.Shell Exec object to capture the output from a command, then searching within the output for certain … Continue reading

Rate this:

Posted in Scripting, Windows | Tagged , , , | Leave a comment

Check if a registry value exists in VBScript

Simple function that returns true if the specified registry value exists, and False if it does not. Function regValueExists (key)       ‘This function checks if a registry value exists and returns True of False       On Error Resume Next       … Continue reading

Rate this:

Posted in Scripting, Windows | Tagged , , , , | 3 Comments

Outlook 2007 AutoArchive PST location change VBScript

Good grief, what a complete pain in the neck this was. Outlook stores a lot of its stuff as REG_BINARY values that have a ox00 separating each character. Nasty. This sub changes the registry value that holds the Outlook AutoArchive … Continue reading

Rate this:

Posted in Outlook, Scripting, Windows | Tagged , , , , , , , | 2 Comments

VBScript and REG_BINARY registry values

Pain in the neck huh? Here’s some stuff I wrote to get around the limitations. Write a REG_BINARY Sub regWriteBinary(sRegKey, sRegValue, sBinaryData)       ‘ Expects sBinaryData to be a comma separated string of hex values       ‘ sRegKey needs to … Continue reading

Rate this:

Posted in Scripting, Windows | Tagged , , , , , , | 4 Comments

VBScript: InStr with Regular Expression function

I don’t think there’s a built-in way to do an InStr with a regular expression as the search string in VBScript, so I wrote one: Function inStrRegExp(sString, sPattern, bIgnoreCase) Dim oRegExp,aMatches, item, bFound, iPosition Set oRegExp = New RegExp  oRegExp.IgnoreCase … Continue reading

Rate this:

Posted in Scripting | Tagged , , , , , | Leave a comment