Tuesday, January 08, 2008

Have you ever need to browse to several pages and print them?  It seems like it should be easy and it is with this little Python script.

I had an Intranet based system that displayed items in a browser.  The manager of the group I built this for asked for a hard copy of every item that fit a certain criteria.  So instead of them going to over 400 pages by hand I just created this simple script. 

It worked like a charm.

#start script

from win32com import client
import time

ie = client.Dispatch("InternetExplorer.Application")

def printPage(url):

    print "printing " + url
    ie.Navigate(url)

    while ie.Busy:
        time.sleep(1)
        print 'navigating...'

    print 'starting print job...'
    ie.ExecWB(6, 2)
    print 'executed print job.'
  
    while ie.Busy:
        time.sleep(1)
        print 'printing...'


printPage("http://google.com")
ie.Quit()

#end script

Sources:

http://www.darkcoding.net/software/printing-word-and-pdf-files-from-python/

http://www.grimsworld.org.uk/printie.html

Tuesday, January 08, 2008 3:44:48 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Friday, November 24, 2006
I've got a few machines at home and I want to use Remote Desktop to connect to them when I'm out and about.  Well one is easy enough to set up if it is either directly connected to the internet (possibly a bad idea) or if you have a wireless router with a firewall and other management features (much more secure).  I have the latter and I set up a rule to forward remote desktop traffic on TCP port 3389 to my main desktop.  But I also have a server I would like to get to.  No problem you just need to change the port that Remote Desktop uses in the registry.  Just go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp and find the PortNumber entry and change it to the port you want.  Make sure you edit it as a decimal by choosing the decimal base.

Here is an easy article on setting up multiple machines for Remote Desktop access.

Check out the article for a lot more info.

Friday, November 24, 2006 8:57:20 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, September 13, 2006

I have some large text files that I want to compress.  The key is that I want to keep them as separate files.  Let's use a little PowerShell scripting to keep this down to one line:

foreach ($file in ls *.txt ) {  & 'C:\Program Files\7-Zip\7z.exe' a ($file.name + '.zip') $file.name }

I'm using a simple foreach construct built into PowerShell.  I'm saying get all files in this directory that have a .txt extension and then iterate through those files executing whatever is between the curly brackets.  In this case it is the command to use 7Zip to compress the file into a new file named the same as the original file with the .zip extension tacked on the end.

 

Wednesday, September 13, 2006 12:08:23 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, August 24, 2006

Filed under WTF?, this one is a goody.  I recently bought a new PC (which is really quiet and I need to write about it) and I installed Windows XP with SP2 and got it all patched up with something like 50-60 downloads from Windows Update and everything was good.  I thought so anyway.  I went to run something using the windows key + R combination and the trusty Run dialog popped up but I couldn't access it instead I had to click on it to gain focus.  What the hell?  So I tried to google on this phenomenon but no joy.  I finally recalled that this seemed to be an issues with Windows not allowing windows to grab focus.  So I downloade good ol' tweakUI and fixed it right up.

 

Sometimes the little things make all the difference.

Thursday, August 24, 2006 9:11:05 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, July 12, 2006
Here's one that I've used several times in the past.  Microsoft has a virtual CD Control Panel that let's you mount an ISO image as a drive letter.  This is really handy if you have an MSDN subscription and are constantly downloading ISO's from the MSDN site.  Instead of burning each ISO to a CD you can keep it on a local or network drive and simply mount it as needed.  This will save the cost of a CD and the clutter of having a bunch of CD's laying around.

I've tested this only under Windows XP.

Here's the link:
Virtual CD-ROM Control Panel

This one is destined for the Pragmatic SDK.

Wednesday, July 12, 2006 8:44:05 AM (Central Standard Time, UTC-06:00)  #    Comments [1]
 Friday, June 30, 2006

I was in the process of downloading Cygwin to in order to get the wc command (among others) in order to do some file verification work.  I stopped for a second and thought why not use PowerShell?  I found a good source for this so here is the command:

PS C:\Scripts\AMA> gc test.134.* | Measure-Object

Count    : 395587
Average  :
Sum      :
Maximum  :
Minimum  :
Property :
Notice that I'm using gc as an alias for Get-Content.  gc, type and cat all work as aliases for Get-Content.  
test.134.* is just a typical DOS file mask to get all files that start with test.134.
Now let's get a word count:
PS C:\Scripts\AMA> gc test.134.23.00 |  Measure-Object -word
Lines                             Words Characters          Property
-----                             ----- ----------          --------
                                   8391
How about a character count:
PS C:\Scripts\AMA> gc test.134.23.00 |  Measure-Object -char
Lines               Words                        Characters Property
-----               -----                        ---------- --------
                                                    1670774
How about an explicit line count:
PS C:\Scripts\AMA> gc test.134.23.00 |  Measure-Object -line
              Lines Words               Characters          Property
              ----- -----               ----------          --------
               8391
Keep in mind that Measure-Object can also be used with objects but we'll save that for another post.  Also it might be nice to try to create a nice short alias like wc to save me some typing.
Friday, June 30, 2006 1:40:55 PM (Central Standard Time, UTC-06:00)  #    Comments [1]
 Thursday, June 15, 2006

I've had to go look for this more then once so here it is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SchedulingAgent

MaxLogSizeKB - This is max size of the log in kilobytes (duh).  Make sure you edit this using Decimal values.  The default in Windows 2000 is hexadecimal. 

Default - Notice I changed the Base to Decimal in order to edit the value correctly:

Changed to reflect a 1 MB (1024KB) size:

You can also change other values like the location of the log (LogPath) but MaxLogSizeKB is the only one I've needed to change on almost every computer.

The task scheduler log file (located by default here at %SystemRoot%\SchedLgU.Txt) keeps track of the start and finish times of all scheduled tasks.  We use the task scheduler to run almost all of our services and batch processed simply because it is ubiquitous and reliable.  However, the 32k limit is a pain as a busy scheduler will quickly fill this up and the log will begin to overwrite itself.  You'll get one of these things:
[ ***** Most recent entry is above this line ***** ]

to indicate where the latest entry is.  I've found that with our schedule it overwrites itself within an hour or so.  Your mileage may vary but with today's huge harddrives it's often beneficial to trade a small amount of space for a large amount of history.  Keep in mind thought that this does open with notepad.exe to if it gets too large notepad may choke. 

You may also want to check out my article on using the task sceduler as a poor man's Windows Service:

 http://www.pragmaticprose.com/PermaLink,guid,5cc361e3-3940-43d9-8591-fb6f5dd00036.aspx

Thursday, June 15, 2006 2:40:18 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Tuesday, June 06, 2006
I've downloaded the RC1 of Windows PowerShell and I'm fairly impressed.  Why should you use this?  Imagine being able to access .NET assemblies and programming constructs from the command line or in batch files.  Also imagine a more "scripty" vbscript.  That's what powershell is.  It's about damn time too after spending a few years in a Unix shop and seeing what can be done in scripts I was getting a little tired of batch files.  PowerShell blows away any current scripting environment.  There's real error handling using Trap.  Where other shells pass and parse text, PowerShell passes objects and you can reference object properties by name.   I've been spending the last week  getting aquainted  with the features and will be posting a few scripts soon.  I've seen about a billion WMI scripts but very few showing basic interaction with existing executables.  Once you get the hang of it however, it's simply great. 

Tuesday, June 06, 2006 8:21:41 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, May 24, 2006

This one is not so obvious.  I was curious one day after using several utilities that wrote a percent complete to the command line.  I had never done this in C# so I went searching.  Here it is:

using System;
using System.Collections.Generic;
using System.Threading;

public class MyClass
{
    public static void Main()
    {
        for(int i = 0; i < 100;i++) {
            Console.Write("{0}% Complete\r", i);
            Thread.Sleep(100);
        
        }
    }
}

Running this code will produce an output like this:

 

Trick originally came from here:

http://www.dotnet247.com/247reference/msgs/6/31315.aspx

Wednesday, May 24, 2006 1:39:57 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Friday, May 19, 2006
This is a multipart series on backing up your computer (at home or the office). 

Part 1 - Decide what needs to be backed up.

First you need to figure out what actually needs to be backed up.  This may be an easy step if everything you work on goes in your "My Documents" folder.  However, if you have stuff scattered across your hardrive it may be a bit more of a chore.  Many programs store your files in default locations.  Let's look at each type of application and see where the files we need to back up are located.

Email
Email is probably one of the most important applications.  Some people (for better or worse) store everything in their email box.  I use Outlook at home and the office.  At the office your information is probably backed up by your server administrator so you shouldn't have to worry.  You may want to double check just in case.  Let's concentrate on the none corporate environment, i.e. home, home office and small office.  You either have a dedicated email client like Outlook, Outlook Express, Thunderbird, etc or you use a hosted service like Hotmail, Yahoo Mail, Google Mail, etc.  If you use the hosted service this should be fairly safe.  Let's focus on the email clients. 

Email Clients
So you use Outlook or another email reader.  These typically download messages from the email server to your local desktop and store them in a file.  In the case of Outlook these are stored in a file ending with a .pst extension.  You can find this file by clicking the file menu then Data File Management.  The dialog box that comes up will display the path to your Outlook data file.  You may have more then one.



You can either leave the file where it is or move it to a more convenient spot.  I will talk about this in Part 2.  So now that we have found our data file we need to make a note of the location and include it in our backup plans. 

Your Documents
A large number of people store their documents in the "My Documents" folder simply because it is the default save folder in many applications.  If all your documents are here then you are in luck.  Otherwise you need to find all of your documents and either organize them or keep track of them.  More about this in Part 2.

Personal Finance Files
Do you use Microsoft Money or Quicken?  If so you have a file that contains all of your financial information lurking on your computer somewhere.  You need to find this.  In Microsoft Money you can click the File menu and then Backup and this should open up in the default backup folder.  Money is smart enough to make a backup of of it's data file.  So you should see a file with the extensions .mny and some files with the extension .mbf.  Make a note of this location as you need to back these up.  You can also change this location.  More about this in Part 2.

Media
Here's where it gets messy.  Media files are photographs, movies, audio files, etc.  In other words these are your vacation photos, your wedding videos and your Itunes music files.  So these files are one of a kind so they should be backed up.  The problem?  They are usually gi-normous (really big).  You need to find all of your media files and these can be difficult to track down because your camera stores photos in one directory, your video software in another and your mp3 collection is in another location.  You need to find all of these files and note the location (more on this in Part 2). 


Friday, May 19, 2006 9:59:26 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, May 15, 2006
So I had a project where I need to have pretty good uptime (.99999) or something like that.  My first thought was to write a Window's Service to house my code.  I had built the prototype as a Console Application and it wouldn't be that hard to move the logic into a Service.  I was planning on using the customizable failure handlers in Windows (right click any service in the services manager MMC and then click on the Recovery Tab to see what I am referring to) to restart the service and possible do some other stuff.  Window's services also have built in support for writing to the event log.

However, I had already added log4net logging and used the email logging to send notifications on failures, all I really needed was the restart-ability that services provide.  Then I had a flash back to my Tech Services days when I used to supported many automated batch type applications that were managed with the Window's Task Scheduler.  I decided to rely on one not so known feature which I will describe in a moment.   Most tasks are scheduled once a day or week,  month, etc.  I scheduled my tasks to run starting now and then repeat every one minute ad infinitum (forever, basically).  Here's the magic: the Window's task schedule won't start a task that is already running!  So now if my task fails it will restart in <= a minute without any of the pains of a Window's Service (installation and configuration, etc).

One day I will find a reason to write a Window's Service but every time I think I need to, I find some way around it.

 |  | 
Monday, May 15, 2006 3:29:47 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Sunday, May 14, 2006
I've been using the backup software that came with my external USB Hard Drive to backup my work, outlook, etc but I've noticed some limitations.  I am currently using Dantz Retrospect Express Version 6.5 and it does a good job as far as it goes.

Good:
  • Easy to use
  • Reliable - it has been running well for several months
  • Conserves disk space by using incremental backup solution to only grab updated files.
Bad:
  • Can't handle open files (The notorius *.pst problem, where Outlook has it's .pst files locked when it's running.)
  • No remote support (ftp, webdav, etc)
  • Closed format - one of the good points is also a weakness.  Consider needing to get information of a backup device but not having the software to get it.  What happens when I don't use Retrospect any more but I need to grab something off one of these backups?  The closed nature of the system means I always have to use this software. 
  • To upgrade to 7.5 professional the cost is $45.00, not bad but this license only covers one machine. 
The problem is I don't want to be on the upgrade treadmill, constantly tied to one vendor.  So the search for backup solutions begins...

Sunday, May 14, 2006 11:07:40 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, March 13, 2006
Shortcut key Description

ALT+PAGE UP

Switches between programs from left to right.

ALT+PAGE DOWN

Switches between programs from right to left.

ALT+INSERT

Cycles through the programs in the order they were started.

ALT+HOME

Displays the Start menu.

CTRL+ALT+BREAK

Switches the client between a window and full screen.

CTRL+ALT+END

Brings up the Windows Security dialog box.

ALT+DELETE

Displays the Windows menu.

CTRL+ALT+Minus (-) symbol on the numeric keypad

Places a shadow copy of the active window within the client, on the Terminal server clipboard, which provides the same functionality as pressing PrintScrn on a local computer.

CTRL+ALT+Plus (+) symbol on the numeric keypad

Places a shadow copy of the entire client window area on the Terminal server clipboard, which provides the same functionality as pressing ALT+PrintScrn on a local computer.

 

Source: http://technet2.microsoft.com/WindowsServer/en/Library/cb97dc74-f62c-4ccc-ae52-1caf5a09a9b01033.mspx

 

Monday, March 13, 2006 9:30:41 AM (Central Standard Time, UTC-06:00)  #    Comments [0]

Open up regedit.

Browse to this key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor

Change the value of this key:

CompletionChar

to 9.

Now pressing tab on the command line does an autocomplete.

Monday, March 13, 2006 9:27:31 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, February 23, 2006

I blogged before about a great text editor named pspad.  This editor is great for heavy lifting and it's full of features.  Those features come at a price and that price is start up time.  When I just want a quick no frills editor notepad is king.  However, I've come across metapad and it seems to be a great notepad replacement.

It's number one feature?  Hyperlinking in plain text files.  I have been using Outlook notes as a catchall note storage for sites, user names etc b/c of the hyperlinking that built into the Outlook notes.  Now I can put my links in a plain text file and enjoy hyperlinked freedom.  It also compares favorably to the popular Notepad2 but the hyperlinking feature makes metapad the king.

Don't forget to get the registry files so you can make it the default editor for html, reg, txt and the text viewer for Internet Explorer's view source command.

Thursday, February 23, 2006 9:20:36 PM (Central Standard Time, UTC-06:00)  #    Comments [0]

Here's how:

http://www.imilly.com/tools.htm#ole

Download and follow the included directions. 

One thing you may need to change is the location of the firefox executable in the InFirefox.htm and InFirefoxPage.htm files. 

Why would I do this?:

Until IE 7 comes out of beta, IE is missing the great developer features that firefox has.  So this is a nice shortcut to open pages in firefox and use the web developer tools.

Firefox already has an extension that let's you open a file in IE and I use this extension instead of this hack.

 |  | 
Thursday, February 23, 2006 11:23:14 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, January 23, 2006

I came across this while searching for a CD recorder for Windows XP.  I haven't burned a CD in a long time and I realized that I hadn't copied one since I re-imaged my system back in May of 2005.  I used to use Nero but I was too lazy to find the software so I downloaded this:

http://isorecorder.alexfeinman.com/isorecorder.htm

It seems to be a bit faster then the built in Windows XP facility for copying data disks via drag and drop.  It also lets you burn ISO's which is a plus.  I'm not sure it's ready for the toolkit yet as it hasn't proven its mettle in combat yet.

---Updated 06/02/2006---

I've used this a few times now and it did the job.  One problem I ran into is that you can't record the ISO's off network drives or drives that are aliased with the subst command.  So just keep that in mind if you are having any problems burning an ISO.

Monday, January 23, 2006 8:30:27 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, January 12, 2006

PSPad is still the winner.   There are some odd things I don't like but for the most part I think it's pretty good.  It still loads fairly fast.  It has GREAT HTML, CSS and JavaScript support along with the color picking ability.  It integrates with TopStyle (and the free Lite) version but with the included intellisense and color support I don't think you necessarily need TopStyle. 

PSPad has made it only 3 of my 4 machines and the fourth I don't use often for development so it's not a big deal. 

All in all I will say that PSPad is the king of development oriented text editor.  For Now...

PSPad Site

Thursday, January 12, 2006 9:42:28 AM (Central Standard Time, UTC-06:00)  #    Comments [1]
 Thursday, December 29, 2005

Adobe Acrobat has sucked for quite some time.   Actually it has sucked since version 6.0.  Now there is a great replacement for it.

Foxit (http://www.foxitsoftware.com/pdf/rd_intro.php)

It's small and fast and you simply download a single exe and execute it.  No fuss no muss and did I mention fast?  It smokes.  It's also free.  This has to be one of the best pieces of software I've seen in a long time.

This is going into the Pragmatic SDK.

 

 

Thursday, December 29, 2005 9:38:00 AM (Central Standard Time, UTC-06:00)  #    Comments [3]
 Friday, September 09, 2005
Every once in a while you come across some truly innovative useful software.  Wink is that type of software.  It's a free application that can capture screen shots as either individual frames are as a mini movie which are then converted into single frames and can then be edited and eventually saved as a flash .swf or windows .exe file. 

I intend on using it for help systems and instructions for remote users.  Did I mention it's free?

All I can say is wow.

http://www.debugmode.com/wink/
Friday, September 09, 2005 11:55:15 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, September 01, 2005
@echo off
call :timer start
dir
call :timer
goto :eof

:timer
if /i "%1"=="start" set timer=
for /f "tokens=2-5 delims=:,." %%a in ('echo.^|time^|find /i
"current"') do (
  set hh=%%a
  set /a mm=1%%b-100,ss=1%%c-100,dd=1%%d-100
)
set /a hh=1%hh:~1,2%-100,timer=hh*3600000+mm*60000+ss*1000+dd*10-timer
if /i not "%1"=="start" echo elapsed time = %timer% msec
goto :eof

:eof

alt.msdos.batch.nt as posted by Garry Deane
Thursday, September 01, 2005 1:15:18 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Tuesday, August 09, 2005

This is a great tip as rsync is super fast and can work both ways.  But rsync is too good just to be a *nix only utility.  There is also a Windows version available from ITeF!x that installs cygwin, ssh and all the other goodies to get you going on the Windows side.  

Follow the installation instructions and you shouldn't have any problems.  

To make life easy I added the default install directory (C:\Program Files\cwRsync\bin) to my path.  I also added a couple of system variables for cygwin: CYGWIN = nontsec and HOME = c:\path\to\home\directory.  

Once you have rsync downloaded an installed you can alter the code above slightly to work on a Windows system.

desc "Deploy basic application directories"
task :deploy => :environment do
  dirs = %w{ app lib test public/images public/stylesheets public/javascripts db}
  dirs.each do | dir|
   onserver = "username@yourdomain.com:/home/username/web/"
   local = "/cygdrive/c/rails_app/" + dir
   cmd = "rsync -arvz -e ssh #{local} #{onserver} --exclude \"*.svn*\" --exclude \"*~\" "
    
   puts cmd
   rsync = IO.popen(cmd, "r")
   while line = rsync.gets
   end
   rsync.close     
  end
end


Notice that in the local assignment I'm not using "#{RAILS_ROOT}/".  This is because of the way cygwin has to access the NT (or FAT I suppose) file system.   "/cygdrive/c/rails_app/" evaluates to "c:\rails_app".  Notice also that I added another exclude for files ending with ~.  This is because I use VIM and it leaves these files all over and I haven't gotten around to another solution but this should serve as an example of how to exclude other file types.

Once last piece of goodness.  If you're using Textdrive (and why wouldn't you?) then you can set up certificates to authenticate with rsync instead of a password.  

Here's how it works.  Open a command prompt.  If you've added C:\Program Files\cwRsync\bin to the path then the ssh command should be available from the command line.  

Type this:

ssh-keygen -d

You will be prompted to save the key to a file.  Choose a location otherwise it will default to the value in your $HOME + \id_dsa.  When prompted for a passphrase you can leave it blank.

Now upload the *.pub file you just created to Textdrive into your  /home/username/.ssh directory and rename it to authorized_keys if this file doesn't exist otherwise copy the contents of your file into  the end of the authorized_keys file.  

Once this is done you know have a way to authenticate yourself via certificate from your machine to the Textdrive server.  This means that when you run the "rake deploy" command you won't be prompted for a password each time because you are authenticating via public/private keys.


Tuesday, August 09, 2005 10:25:37 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Saturday, July 02, 2005

I'm writing this looking back from a potential future where microsoft becomes a consulting services company and its Windows OS is is the OS/2 of its day.  Microsoft failed to embrace the Open Source software movement.  Well not exactly.  Microsoft failed to research the make up of this group.  Not only the creators of OSS but the users of OSS.  The users are almost more importannt then the developers in this case.  Why?  MS decided that OSS was foolish and that the developers engaged in OSS where giving away their services and their time.  MS argued that software should be paid for and that developers should be making money.  I can't argue with any of this and on this point they are very correct.  However you have to look at the motivations of the OSS community. 
    The first perspective is the users.  They get free software without the worry of the licensing nightmare that accompanies most commercial software.  There is no good way to keep track of the software installed on most systems.  Don't get me wrong there are several improving ways of monitoring installed software but this is usually not free.  There is SMS and related products but this is still difficult, with many small to medium companies struggling to 1) understand their licensing agreements and 2) comply with their licensing agreements.  How do I know this?  I was employed by a small division of a VERY large corporation.  We had incredible resources but it was still a great challenge to manage all of the various MS and related software and all the third party software.  When you are told to install software on that laptop today because the boss is going out of town and needs it right now, you do it. 

            However as we move forward in time and major shift in development away from desktop and towards web applications began.  The two reasons for this were 1) DLL Hell, which is its own article/book/series of books on its own and the licensing debacle referenced above.  So we have a paradigm shift from desktop software to web software to alleviate the installation and maintenance nightmare of desktop software.  Note that we have had several paradigm shifts from the original main frames and UNIX boxes to the all powerful desktop to the client server heydays of the mid nineties and eventually to the web centric model that is emerging today. 

            Microsoft of course saw this and countered with .NET.  Make you think that .Net is all about the network and every server and desktop with .NET would be instantly connected and on the web.  Well here is reality: .NET did not ship with Windows XP.  Nor was it on the 2000 servers most people were using at the time.  But the worst was yet to come.  All of my client server apps written with VB6 and MSSQL would have to re written because VB.NET was not backward compatible with VB6.  Goodbye desktop hello web.  So VB6/COM training/talent/know-how goes to ASP and ASP.NET and then in ASP.NET vbscript is abandoned (rightfully or wrongfully) in favor of javascript.  So know I have wasted 5-6 years with VB and COM and must upgrade my skills.  So lets go looking for training for our staff. 

Wait a second.  What’s this java stuff.  That will really take off and that’s what all the big guys use on their servers and even better this language was written for the web and even better developers can fell like they are writing in C and feel smart while having the memory management of VB.  Yeah Java!  Then along comes .Net with C# the Java killer. 

All the while many free lance developer, student, academics, government and pretty much any software developer who has limited resources has been searching for ways to reduce software costs while remaining inside the boundaries of the law.  Well a few of them get together and figure some stuff out and write some programs to share.  Why not create this and why not create that and pretty soon you have an OS and a web server which is all your really need in this new world.  Why not have a few web languages?  Keep building on the foundations of what is currently available, get smart and hungry people to work on it and wait a while.  Pretty soon you have some pretty good tools written for smart people by smart people to do the things you need to do.  Bugs are fixed quickly, people are friendly this whole thing isn’t too bad. 

So all of a sudden OSS becomes to pretty decent software with a price that you can’t beat.  So the question is why pay for all that software especially when all you need is a web browser (available on Windows 98) to access all of the company network and software which is now web based.
...End of Part 1...Part 2 soon to come...

Saturday, July 02, 2005 11:28:43 PM (Central Standard Time, UTC-06:00)  #    Comments [2]
 Tuesday, June 21, 2005
Here's a rather lengthy article on how Microsoft is losing the API war to the Web.  He goes on to explain why M$ has stopped working on DHTML and Internet Explorer.  Worth the read but set aside a few minutes to you can get through the whole thing:

It validates all of us former desktop dudes who have fled to the web. 

http://www.joelonsoftware.com/articles/APIWar.html
Tuesday, June 21, 2005 10:41:55 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Friday, June 17, 2005
UNIX has a nice command named alias that lets you create a new command from either one or more existing commands and parameters.  For instance you could alias "lpstat -t | pg" as "stat" and then you could just type stat at the command line instead of the long ugly string each time.

Windows (at least up to XP) does not have a mechanism for this.  Instead I use batch files to replicate the alias functionality.  I create a directory containing all my alias batch files and then add this directory to the path like this:

    from the command prompt type: 
   
        path = %PATH%;newdir

   %PATH% is the environment variable that represents the current path so this command allows you to append to the current         path.

So in my case I created a directory c:\work\cmd and then added it to the path path = %PATH%;c:\work\cmd.  Then I create the batch files for each command I want to alias.  For instance I use gvim so i created a bat file with this text:

    Start "GVIM" "C:\Program Files\vim\vim63\gvim.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9

and saved it as vi.bat.

    Start tells windows to open the program in a new window.  Otherwise your command line window will hang and wait for the     program you launched to exit, which is not the behavior I want.

    "GVIM" tells windows what the display name of the window is.  Not necessary but I like it.

    "C:\Program Files\vim\vim63\gvim.exe" is the full path the exe to run.

    %1 through %9 is simply a way to pass through any parameters on the command line (like file names) to the program you         are starting.
   
So now I can "vi" a file by typing "vi filename.txt" from the command line.

I like this technique because it is very portable between machines.  Just copy over one folder and then add one entry to the path and you are set.  Very handy for me since I regularly use 3 PC's and I'm always tinkering with new programs etc.  It's not as nice as alias but it works.


Friday, June 17, 2005 2:01:34 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, June 15, 2005
I was looking for a way to delete a Window's service and I came accross the sc command.

Just open a command prompt and type sc and then the action you would like to perform.

Examples:
    Delete a service: 
        sc delete service_name
    Start a service:
        sc start service_name
    Stop a service: 
        sc stop service_name
    List all services: 
        sc query
 
The actuall service information is stored in the registry at this location:  
  HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services
If you're curious I was re-installing MySql on a machine and the mysql service already existed so I needed a way to get rid of it.  I knew there was a command to control services but I had to do some research and came up with this.

Enjoy.
Wednesday, June 15, 2005 12:59:21 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Tuesday, May 31, 2005

For anyone who has used Norton Ghost to build an image, Acronis True Image Pro 8.0 will be a breath of fresh air.  Here are the features:

  • Easy to use GUI interface
  • Can be used inside Windows XP, no need to boot into DOS
  • Reasonably priced, I purchased my copy for $32.50 from newegg.com, Norton Ghost appeared to be priced about twice as high
  • Can mount images as drives and browse the contents.

I downloaded it, installed it and made an image in about a half hour.  I did not need to create any 3.5" floppy boot disks ala Norton.  Everything was done inside Windows XP.  I love it when you can buy software quickly, it does what it says its going to do and you can go on with your life.

*one note, the software is $50 on Acronis' site but can be had cheaper on newegg.com or a similar site.

www.acronis.com


Tuesday, May 31, 2005 9:43:04 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
This weekend I had some time so I decided to wipe my PC and start from scratch.  I wiped off my current XP Pro build and installed it from scratch.  This time however I created an image of my clean install once I had downloaded and installed all the updates, security patches and service packs for Windows.  I installed a minimum number of drivers so that I can use the build if my devices change. 

All in all it is a pretty smooth transition.  I keep all of my data on a seperate drive from my OS so the transition was pretty straight forward.  I need to start doing this every few months just to keep things clean.
Tuesday, May 31, 2005 9:34:12 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, April 27, 2005
Wednesday, April 27, 2005 2:24:00 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
This is  a good article on a feature of Windows XP that I did not know about:

XP Prefetch Explanation
Wednesday, April 27, 2005 8:20:42 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, April 20, 2005
I worked at a company where a majority of error notifications from our batch programs was handled by e-mail.  This turned out to be a pretty good system until the dreaded security patch for Outlook arrived on the scene.  It essentially neutured Outlook as you counld no longer send message from a script (VBA or even Visual Basic) without getting a pop-up box.  Brilliant solution and quite elegant as it fixed the problem immediately and finally (well kind of).  However, those of us who came to rely on Outlook to do certain things, like send our error messages and process communications pulled our hair out and nashed our teeth. 

Recently I have come upon a nice hack to get the functionality of Outlook back.

http://www.dimastr.com/redemption/

This hack will let you use a similar object model to the original one without the security restrictions plus there are some additional properties and methods that the original object model did not have.  Well worth looking at if you want to automate Outlook.


Wednesday, April 20, 2005 2:02:45 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
I'm not sure if this just affects Gateway laptops or if all laptops are subject to this issue.  On a laptop even when the correct mouse drivers are installed you are not able to set all mouse properties.

One of the annoying ones is the "lines to scroll" for each mouse wheel rotation.  It defaults to a very annoying low amount of 1.  This is not very good at all.

To get around this you can use the TweakUI powertoy from Microsoft to change the lines per scroll.  Download the powertoy then open it, go to the Mouse branch then Wheel, make sure Use mouse wheel for scrolling is checked and then choose the Scroll by X lines at a time where X is the number of lines you want to scroll.
Wednesday, April 20, 2005 8:53:23 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, March 28, 2005
I am in the process of putting together my own SDK (Software Development Kit).  No this is not a 50 Meg download from my site but rather a portable software development toolbox that I can take on the road.
fLogViewer
Category Name URL
Text Editor

Crimson Editor

PSPad

Notepad++

Metapad

http://www.crimsoneditor.com/

www.pspad.com/

http://notepad-plus.sourceforge.net/uk/site.htm

http://www.liquidninja.com/metapad/

Source Control Subversion http://subversion.tigris.org/
Source Control Subversion Windows Shell Extension http://tortoisesvn.tigris.org/
Web Browser Firefox http://www.mozilla.org/products/firefox/
Design CRC Cards http://c2.com/cgi/wiki?CrcCard
Code Generation Code Smith http://www.ericjsmith.net/codesmith/
Archiving 7-Zip http://www.7-zip.org/
Various Excel http://office.microsoft.com/en-us/default.aspx
ftp/sftp FileZilla http://filezilla.sourceforge.net/
html/xml formatting HTML Tidy http://tidy.sourceforge.net/
Clipboard Manager CLCL http://www.nakka.com/soft/clcl/index_eng.html
Shortcut Manager

Winkey

QLiner Hotkeys

PC World

http://www.qliner.com/hotkeys/

Log File Viewer fLogViewer fLogViewer
Desktop Search Copernic http://www.copernic.com/en/products/desktop-search/
Monday, March 28, 2005 3:55:44 PM (Central Standard Time, UTC-06:00)  #    Comments [0]