Bohack

Check In and Tune Out!
 
 

Archive for the ‘Scripts’ Category

Installing Fonts On Windows 7 From A VBScript

Tuesday, September 18th, 2012

Recently I needed to install a number of fonts from a folder into a Windows 7 installation. One notable change with fonts since Windows XP is that you can’t just copy the fonts to the fonts folder. Windows Vista and 7 needs to register the font in the registry.

(more…)

Tags: Script, VBScript, Windows 7
Posted in Scripts, Windows 7 | Comments Off on Installing Fonts On Windows 7 From A VBScript

Converting Active Directory Last Logon Time Integer to a Readable Date and Time

Saturday, February 25th, 2012

If you have every used CSVDE and exported Active Directory objects, you’ve noticed the integer that represents time. Last logon time is one such value that is represented as this integer. There is a way to convert it to time and date that is human readable.

(more…)

Tags: Active Directory, AD, CMD, Excel, PowerShell, Script
Posted in Programming, Scripts, Windows, Windows 2008 | Comments Off on Converting Active Directory Last Logon Time Integer to a Readable Date and Time

A Simple PHP mail() Function For Testing SMTP Delivery

Saturday, January 9th, 2010

Making sure mail is sent properly from a PHP website is a bit difficult when it’s not your server, like shared hosting. You never have access to the mail logs, so you can’t see mail moving. I host several websites on shared hosting and recently found my CMS was not sending emails to me. So I opened a ticket and I concluded it to be a SNAFU.

(more…)

Tags: php, Web
Posted in Programming, Scripts | 1 Comment »

How To Save A Webpage In HTML To A File In VBScript

Monday, December 14th, 2009

I had just finished working on a project where I needed to programmatically get a web page and save the HTML to a file. I started toying around with some code I used for parsing XML and totally rewrote the code. I found that I kept getting an error of “Microsoft VBScript runtime error: Invalid procedure call or argument”. I couldn’t understand what was going on. I was passing the parameters correctly to the File System Object, but I kept getting the error. All FSO was doing was creating a file and writing the string out. So I checked the length and then started writing the left(string,number) and found it was a character that was in Unicode. So I wrote a Unicode to Ascii function that is not all that efficient, but it is very effective. The sample code below will get a webpage from Google and save it to a file.

(more…)

Posted in Programming, Scripts | 6 Comments »

Query and Parse XML from VBScript

Saturday, February 14th, 2009

Toying around I needed to query XML from VBScript and parse it out for only the elements I needed. So I wrote a VBScript and figured I would share it. Many posts out there just load a file rather than a URL, this script will do both and I simplified it a bit.

(more…)

Tags: VBScript
Posted in Scripts | 1 Comment »

Simple VBScript to Display a Web Page

Saturday, February 7th, 2009

I was currently working on a VBScript to pull some information from a web page. So decided to build a function for it, so that it can be reused over and over again in other scripts. It uses the XMLHTTP library to query a URL and return the elements, I just ask for the responsetext and return it.

(more…)

Tags: Scripts, VBScript
Posted in Scripts | Comments Off on Simple VBScript to Display a Web Page

PHP Page Stop Watch

Saturday, January 31st, 2009

Lots of time I have web pages performing complex functions and want to make sure that they execute without a problem. A problem would be they just take too damn long and time out when put under a load. This is the problem when things don’t scale properly, they just get really slow. So in order to gauge how long a page takes to load we really need a stop watch. Luckily we the components of one…

(more…)

Tags: php, Scripts, Web
Posted in Scripts | Comments Off on PHP Page Stop Watch

  • Channels

    • Beer (2)
    • Blog (1)
    • Exchange (2)
    • Ham Radio (1)
    • Homebrew (3)
    • Linux / Unix (4)
    • Misc (1)
    • Mods (4)
    • Networking (1)
    • Programming (4)
    • Recipes (2)
    • Scripts (7)
    • Security (1)
    • Software (2)
    • Spam (1)
    • Telco (7)
    • Virtual PC (1)
    • VMware (3)
    • VOIP (3)
    • Windows (16)
    • Windows 2008 (4)
    • Windows 7 (5)
  • Archives

    • September 2012
    • April 2012
    • March 2012
    • February 2012
    • January 2012
    • November 2011
    • September 2011
    • July 2011
    • April 2011
    • February 2011
    • January 2011
    • October 2010
    • August 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • June 2009
    • May 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
  • Links

    • Blogarama Blogarama – The Blog Directory
    • BlogHub Blog Directory
    • Blogrankings Technology Blogs – Blog Rankings
    • Blogville.us blogville.us
    • Buzzerhut free directory | buzzerhut.com
    • Ontoplist Online Marketing
    • Primechoiceautoparts Discount Auto Parts
    • PTC My Employer
 

  Copyright - Bohack 2025 ©