Archive | October, 2009

VBScript: Create Shortcut (.lnk) File

Following is a starting point for a script which will create a standard shortcut on the desktop.

Read more

VB.NET: Get User’s SID from Active Directory

This function will connect to Active Directory and search for a specified username, and if found, return that user’s SID. Usage: GetSIDUsingADSearch(“john.doe”) Returns: S-1-5-21-53580104-3876648466-4083845538-427214

Read more

VB.NET: Parse “Special” Shortcuts

I recently had a problem in one of my applications where, when trying to parse .lnk files for target (using the WshShell approach), I would get something like C:\Windows\Installer\{GUID} instead of the path to the executable. Turns out some .lnk files (shortcuts) are of a different breed, ala “MSI Shortcut” or “Windows Installer Advertised Application”. [...]

Read more

VB.NET: Encrypt/Decrypt String (DES)

These functions will encrypt and decrypt (using DES) a string using a secret key. Encrypt(“I need this string to be a secret”, “$ThIsIsAsUpErSeCrEtKeY!”) will return a string with the encrypted text. Decrypt(“5FkBed78KfrLmoU==BNu37N5kl”, “$ThIsIsAsUpErSeCrEtKeY!”) will return the original string that was encrypted with Encrypt() and the same key. If a different key is used for Decrypt() [...]

Read more

Wow! A case study of one of my projects

Moments ago, I stumbled upon a case study that I helped write on a project in which I was the programmer (Brian Miller was the engineer and Trey Mayfield was the project manager). This was my flagship project during my nearly four years at Ener-Tel, and the one I’m most proud of. This was due [...]

Read more

Enabling PHP mail() in Debian easily and quickly

I’ve run into a problem more than once where the mail() function in PHP didn’t work. Unlike in Windows, you can’t simply set an SMTP server in the php.ini file; you must set a value for the sendmail_path. If you’re running a mail server like Sendmail of Postfix alongside your web server, this is no [...]

Read more

That Song

I had a song stuck in my head; one from the early 90′s that I was guessing had actually been produced in the late 80′s. I’d heard it at a skate place in Lubbock where my brother and I accompanied our dad on weekends. Many years later, my friend Dave gave me a CD which [...]

Read more