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]
 Thursday, October 19, 2006
Here's a quick tip to get png's with alpha transparency to show up correctly in Internet Explorer.  Instead of hacking you website, hack the picture! 

Using a utility like TweakPNG, you edit the meta information of the PNG format to display a white background (or whatever color you want).

Open the .png in TweakPNG and insert a chunk named bKGD using the Insert menu.  Then simply double click your newly created chunk in the main window to bring up a color chooser.  Select the background color and away you go.

 |  | 
Thursday, October 19, 2006 1:24:51 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 22, 2006

I've upgraded the GreaseMonkey Google Navigator script to fix some minor issues with the next and previous keys in groups.google.com and I've added the "open link in new tab" functionality via the 't' key.  Check it out:

http://userscripts.com/scripts/show/3984

Or right here at:

http://www.pragmaticprose.com/content/binary/googlenavigator.user.js

Thursday, June 22, 2006 8:36:30 PM (Central Standard Time, UTC-06:00)  #    Comments [1]

A new contender for the Pragmatic Toolkit is PDFCreator, a SourceForge project which allows you to print to a pdf file much like you would a normal printer.  This is useful if you want to need to capture output to a platform inpependant format.  For example, you have a web page that shows a reciept from an online purchase.  Use PDFCreator to print it to a PDF so you have a nice record of the purchase.  This also works for screen prints or any other capture operations where you have an applications that can print (basically any editor program like Word, StarOffice, PaintShop Pro, Photo Shop, etc). 

I use it to screen capture protected web pages (on sites where you need to sign in) and send it to someone who doesn't have access to the site, like my wife.  It's useful if you are going for a paperless office as you could scan your paper items and then print them to PDF (if your scanning software doesn't support it natively).  You can also create product documentation by creating the document in Word and then printing it to PDF to create a manual for distribution to customers.

Here is the link:

http://sourceforge.net/projects/pdfcreator/

Thursday, June 22, 2006 10:10:39 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 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]
 Monday, March 13, 2006

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

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]