Archives for: 2008

12/29/08

Permalink 08:22:00 pm, by dave Email , 1236 words, 9795 views   English (US)
Categories: Windows Scripting, Wsh Scripts

VB Script to Export Outlook Contacts to vCard (vcf) file

Have you ever needed to export your Outlook contacts to vCard file (vcf) format? I did and I couldn't find an easy way to do it. This script takes one command line argument, the path where the vCard files will be stored. It then opens your Outlook contacts and exports all of them. Each vCard file will be named based on the first and last name of the contact.

Read more! »



Did you like this post? If so, Share it!  del.icio.us digg reddit slashdot this article Facebook Twitter MySpace Email

12/22/08

Permalink 08:50:07 pm, by dave Email , 604 words, 1150 views   English (US)
Categories: Windows Scripting, Wsh Scripts

VB Script to determine Active Directory Domain Mode

Recently, I needed a to determine if an Active Directory Domain was in native or mixed mode. After some research I came across a way to do this for Windows 2000 and 2003 domains. This script combines those two methods and can be used to determine the mode for Windows 2000 and 2003 domains. The one command line argument it expects is for the Windows 2000 domain mode determination. It works best if this script is executed from a machine that is member of the domain that is being queried.

Read more! »



Did you like this post? If so, Share it!  del.icio.us digg reddit slashdot this article Facebook Twitter MySpace Email

12/21/08

Permalink 09:28:31 am, by dave Email , 920 words, 4564 views   English (US)
Categories: Windows Scripting, Wsh Scripts

FTP from a VB Script using the MSInet Control

I had a need to ftp a variety of files recently and while I could have thrown together a perl or batch script to do it,I decided it would be interesting to use VB Script to accomplish it. The first thing I found out, was that most folks doing this are using third party controls. I could have gone that route, but I didn't want to have to pay for a control. So I decided to try to do it using the MSInet Active X Control. This worked well for me once I registered the control on the machine that runs the script.

Read more! »



Did you like this post? If so, Share it!  del.icio.us digg reddit slashdot this article Facebook Twitter MySpace Email

12/07/08

Permalink 09:28:27 am, by dave Email , 552 words, 22369 views   English (US)
Categories: Windows Scripting, Wsh Scripts

Using Command Line Named Arguments for VbScript

Normally when I handle arguments that are passed to a windows script, I use unnamed arguments. The other day, I was looking for something and I can across a reference to named arguments in windows scripting. After a quick look at this, I realized that using named arguments was the way to go.

To get the arguments from the script, I used to use something like this for unnamed arguments:

value = wscript.arguments.item(0)

Now with named arguments, I can use:

value = wscript.arguments.named.item("argument identifier")

Read more! »



Did you like this post? If so, Share it!  del.icio.us digg reddit slashdot this article Facebook Twitter MySpace Email

11/18/08

Permalink 10:11:05 pm, by dave Email , 693 words, 545 views   English (US)
Categories: Windows Scripting, Wsh Scripts

Enumerating Running Process using VB Script and WMI

This script will use WMI to enumerate all running processes. The script then displays some basic information about the processes. The script also displays information about the executable file it self.

In the initial comment block inside the the code, you will see a listing of all the different attributes that are available when using WMI to get information about processes.

Read more! »



Did you like this post? If so, Share it!  del.icio.us digg reddit slashdot this article Facebook Twitter MySpace Email

10/12/08

Permalink 06:16:40 am, by dave Email , 475 words, 277 views   English (US)
Categories: Windows Scripting, Wsh Scripts

Script to Identify File Creation, Modification, and Access Times

This script will identify files that have been created, accessed, or modified in the last 30 minutes and depending on how you want it to act, it can delete the identified files.

I received a request for this script from the scripting request form. The requirements from this request were, i needed your help in the Wsh scripting to delete the files created or access 30 minutes back in a paticular folderthanks in advance .

Read more! »



Did you like this post? If so, Share it!  del.icio.us digg reddit slashdot this article Facebook Twitter MySpace Email

02/14/08

Permalink 06:14:48 pm, by dave Email , 326 words, 345 views   English (US)
Categories: Windows Scripting, Wsh Scripts

Using replace to update web related files

I was working on some web stuff for a friend and his development environment and my development environment are extremely different. After a couple of go rounds with global search and replace to fix the differences and always missing stuff (of course). I took one of my existing scripts and modified one of the sub routines to do this for me.

Read more! »



Did you like this post? If so, Share it!  del.icio.us digg reddit slashdot this article Facebook Twitter MySpace Email

Scripts

This is somewhere I can post interesting snippets as I come across them. Hopefully some folks out there will find this helpful.

Search

Follow Me:

Misc

Who's Online?

  • Guest Users: 3

powered by b2evolution free blog software