Archives for: 2009
12/31/09
Making your blog display more mobile friendly
After adding the twitterlution plugin to my blog, I thought it would be a good idea to make the blog a little more mobile friendly. So after doing some research, I came across Mike Industries' post about making your site mobile friendly and Lightweight Device-Detection in PHP post.
After some creative combining, I have updated this blog to display in a different format if you access the blog from a mobile device. I know that the site is much more lightweight now, but the format needs tweaked to be more usable. That being said, here is what I did.
12/22/09
Adding URL shortner to B2evo twitterlution plugin
I finally got around to adding the twitterlution plugin from Lee Turner and it works great. One thing I noticed was the long URLs from my blog being sent to twitter. Other than that, I am extremely happy with the plugin.
I wondered how hard it would be to add a URL shortener (bit.ly in this case) to the plugin. It turned out to be fairly straight forward.
First I went and got a userid and apikey to bit.ly
Then I searched for an example of making a call to bit.ly from php and I found this example by James Cridland
Then I added the Services_JSON module to my web server
03/11/09
Exporting Outlook Distribution Lists to CSV Files using VBScript
Have you ever needed to export the members of a distribution list to a comma delimited file? If so, this script may help you out.
It connects to Outlook and then cycles through all the distribution lists creating a separate csv (comma separated value) file for each distribution list. The csv file contains a header row that identifies the columns of data and then the data itself, the name and email address of all the members of the distribution list.
This script takes one command line argument, the path where the csv files will be stored.
03/07/09
Using ADSI and VBScript to enumerate local user accounts
Have you ever needed to look at all the accounts and the account properties on your local computer? I have, and I could not find a good way to get a listing of all the accounts with their populated attributes. So I created a script that will do just that, enumerate the local computer's users and list the populated user attributes.
02/09/09
VB Script to Export Outlook Contact Email Addresses to a text file
Have you ever needed to export the email addresses of your Outlook contacts to a text file? One of the visitors here was needing to do this. So I modified the script I wrote that exports contacts to vcf files to create a text file that just contains the email addresses of all of the contacts. This script takes one command line argument, the path where the test file will be stored. It then opens your Outlook contacts and extracts the email addresses for each contact and writes those addresses to a file named emailaddress.txt
02/03/09
Computer Nightly Maintenance Command File Sample
One of the things that is very important to do if you are a computer user, is to take care of your computer and protect your data. This sample command file uses two Windows XP built-in commands XCOPY and DEFRAG to do this. XCOPY is used to backup folders / files that are specified and DEFRAG is used to clean up any fragments in the file system on your hard drive.
Loading the Registry Hives from an External Hard Drive
I recently needed to take a hard drive out of a family member's computer in order to clean up and virus infection. If you ever have to do something like this, one of the things that you will need to do is remove any of the virus related entries from the registry of the infected machine. This sample command script will load the two most likely registry hives, start regedit, and then unload the hives when regedit is closed.
01/22/09
Query Scheduled Tasks using VBScript
For anyone who ever tried to query the scheduled tasks on a Windows machine using windows script host (e.g. vbscript) and received unexpected results or missing tasks, that is because there are two ways to work with scheduled tasks. One way uses the NetSchedule API set and the second uses the Task Scheduler COM interface. There is a scriptable interface for the NetSchedule API set, we know it as WMI.
How to make sure that a script is run using cscript
Most of the scripts I write are intended to be called from the command window using cscript.exe. Something like.....( the nologo argument gets rid of the title block that cscript spits outs everytime it runs )
C:\scripts>cscript /nologo someScript.vbs
Recently I ran into a situation where a script was being called using wscript.exe instead and the script was not acting properly. After a little research, I came up with this solution:
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: 1




