Archive for the ‘Scripting’ Category

Sending CDO.Message with importance

Friday, June 9th, 2006

Here’s a script, well, a subroutine I wrote today for sending an email with VBSCript using the CDO.Message and CDO.Configuration COM Controls available in Windows. Having struggled a little to actually get it working (mainly through utter stupidity), I thought I’d blog it for anyone else struggling or just needing a quick fix.
(more…)

Searching Active Directory with ADSI and VBScript

Wednesday, April 12th, 2006

When I’m looking for something in the Active Directory I don’t want to spend 30 seconds clicking [+] boxes to expand trees and manually look for a user or computer object so I created this script to do the job of finding it for me and telling me exactly where I have to go to find it.

(more…)

Remote Scripting: “ActiveX component can’t create object” on WSHController Object

Tuesday, February 28th, 2006
Scripting

While perusing the WSH 5.6 documentation I happened across a section on Remote Scripting. I imagined Remote Scripting to be possible but it isn’t something that I had seen before in the documentation. I started investigating and so created the scripts as suggested and ran the test.

Straight away I got the "ActiveX component can't create object". Obviously I was a little confused since this is a Microsoft example script. No matter how I created the script I got the same error every time and there was no obvious reason why I was getting the error.

It turns out to be a problem relating to the installation of Windows XP Service Pack 2 that cripples remote scripting in WSH 5.6. Obviously it was a security decision by Microsoft. A well considered one I’m sure but they could have given we sys admins a few ideas! Read on for information on how to solve the ActiveX component can't create object error…
(more…)

Offer Remote Assistance in Windows XP Professional

Wednesday, February 15th, 2006

 

Remote Desktop

I’ve spent a few hours this morning investigating Remote Assistance in Windows XP Professional. At first glance it looks like a potential VNC killer for the enterprise. Unfortunately, if you don’t look closely enough you’ll quickly dismiss it, most likely by seeing these initial limitations.
(more…)

List installed programs (VBScript)

Wednesday, October 5th, 2005

This bit of VBScript will allow you to return a list of applications installed (as seen by Add/Remove Programs). The function returns a simple Array() containing the list of applications installed.

Combined with an ADSI script that returns a list of computers, you can use this function to iterate through all machines on your network to gather a list of installed applications on each machine.
(more…)

Searching Active Directory (VBScript)

Friday, September 30th, 2005

If, like me, you have been left irritated by the search function in Active Directory Users and Computers simply not telling you WHERE a particular user or computer actually is, simply use this bit of code. It allows you to search through AD for users or computers and returns a list of what it finds and the FULL canonical name so you can actually find the damned thing.

You could of course expand this script to perform user modifications such as resetting passwords, without the need to use the AD MMC console.

Click the link to see the script. (more…)

Using ADO & PHP to query a CSV file

Sunday, September 18th, 2005

OK, so I finished my book on VBScript. While interesting and informative it certainly didn’t cover all the aspects of VBSCript that I’d like to know about. Scouring MSDN for clues just isn’t my idea of fun either and quite frankly gets me a little irritated. Why it can’t be like the PHP Website is beyond me.

While the book did touch on ADSI and WMI, it didn’t really give me much in the way of detail about actually doing anything with the information I can gather. So I can tell who’s logged on to a computer if I issue a WMI query specifically to that computer, so what!? (more…)

Learning Windows Scripting.. pff

Tuesday, September 13th, 2005

After my last post about VBScript/WSH I thought I would bite the bullet and get myself a couple of books to learn about Windows Scripting to assist with network management, logon scripting etc.

I bought two books, Microsoft Press Windows Scripting Self-Paced Learning Guide and Windows Admin Scripting Little Black Book Second Edition.

The obvious place to start was with the book that will teach me about Windows Scripting so I begin on Saturday afternoon. 164 pages later and I’m on Lab 18a which is the DIY section of the chapters. A great idea to actually use VBSCript to achieve what you want to do. This particular chapter deals with WMI and accessing the WMI namespace to retrieve data that you can use for reporting or whatever really. So the lab runs you through creating a script which ends up looking exactly like this: (more…)