Archives for: December 2008
12/29/08
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.
12/22/08
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.
12/21/08
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.
12/07/08
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")
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:
Categories
- All
- Web Technologies (2)
- PHP (1)
- Windows Scripting (37)
- Batch Scripts (13)
- Wsh Scripts (23)
Archives
- December 2009 (2)
- March 2009 (2)
- February 2009 (3)
- January 2009 (2)
- December 2008 (4)
- November 2008 (1)
- October 2008 (1)
- February 2008 (1)
- December 2007 (3)
- July 2007 (1)
- April 2007 (1)
- February 2007 (2)
- More...
Misc
Who's Online?
- Guest Users: 6




