BPSoftware.com
Home   Utilities   Purchase   FAQ   Support   Contact        
Shareware Utilities
 APrintDirect
 AIconExtract
 AFile Attribute Manager
Freeware Utilities
 AddrMon
 AFileSync
 ASysIcon
 B&P Table Utilities
 BPACLer
 BPSNMPMon
 BPSNMPUtil
 CharCount
 Delphi® Components
 MacAddr
Miscellaneous
 BPSoftware Blog
 Purchase Shareware
 Support

 


Sunday, October 30, 2005
Delphi™ Components: TFileEdit Updated

A minor adjustment has been made to TFileEdit. The latest version of this component may be downloaded from here. TFileEdit is a descendant of TEdit which contains a button that, when clicked, calls an open file dialog that fills the TEdit control with the selected file name and path information. TFileEdit also has ButtonClick Event in order to perform your own action when the button is clicked.

Labels: , , ,

posted by Brad Prendergast at 8:52:00 AM (0 comments)
Links to this post
Permalink
Thursday, October 27, 2005
My Own Virtual World

I actually intended on writing a small paragraph on Microsoft Excel’s conditional formatting that hopefully I’ll get to at some other time. The reason for the shift is due to today being one of the more exciting days I’ve had in a while. I’m not sure how many others can appreciate why, but here goes:: I received the much anticipated copy of Microsoft Virtual PC 2004.

I tried explaining my outwardly expressive excitement to a relative and their direct response, ‘You’re a nerd!’ I am not certain how I should have taken that, but being a bit defensive; I went ahead and denied it profusely. Should I have a bit of resentment towards that comment?

Immediately following my repudiation, I continue along like I was a kid in a candy store. For those that aren’t fully aware of what this program does, it basically, allows you to run many virtual machines simultaneously on one desktop. Not only are these acting as separate machines, but they’re in there own (separate) space and have their own (separate) operating systems and applications installed. Note: It doesn’t come with anything other than the Virtual PC software so you’ll need to make sure you have your own legitimate copies of the operating systems that you intend to install. This would also hold true for any of the applications you install on the Virtual PC as well. I’d read the licensing carefully. I am a firm believer that an author’s license agreement should be honored.

Another thing [with this software] that caused my great excitement is that each Virtual PC is contained within one individual file on the host machine. Tell me that this isn’t sweet. Just think of all the potential things this could mean. You can easily backup the file and have ‘virtually’ a complete system backup. Each file is virtually its own machine, so you could set up the host bare bones and use one of the virtual machines as your main system. In the event of a host failure you could quickly get the Virtual Machine running of a different host. Provided you have the proper backup of course. This results in a quasi-disaster recovery plan. This also allows for a nice avenue to go in and test some tweaks and setting changes here and there and then simply replace a file to get you back to square one. There is an undo disk option that I haven’t played with that claims allow for reverting back to a previous state.

The added bonus is application testing with different operating systems. The testing of applications at various levels of patching and service packs on these systems before rollout is simplified 10,000 fold. Did I mention each Virtual Machine is in one file? Think of how quickly you can replace a tragically altered Virtual Machine. Gone are the days of separate machine(s) for pre-deployment testing. A robust production machine can quickly test a wide range of scenarios with far less space and equipment minimizing down time.

Each machine is customizable to the extent of memory and system resources. From my experience thus far it has access to most all of the host system’s hardware resources. You can even specify which NIC a Virtual Machine will use (if you have more than one or if at all).

If it is any indication of my level of excitement is that I dug into the treasure archive and set up a Virtual Machine with my old MS-DOS 6.22 disks. I haven’t touched a floppy in years, but figured it’d be a nice ‘to have around’ setup. I even found some DOS 6.0 and Windows 3.1 disks. Those will get setup as well. Why install them? Who knows, but they all will reside in their own files. The file sizes don’t seem to be bulky at all, in fact it seems to be the opposite it is not a 1:1 relationship. I did also go through the motions wiith Windows 98SE, Windows XP Home and Windows 2000 Pro Virtual Machine and they all initially seem to work well.

Next up at bat is Fedora with Open Office…… a nice slow transition……

Labels: , ,

posted by Brad Prendergast at 10:19:00 PM (0 comments)
Links to this post
Permalink
Tuesday, October 25, 2005
What’s the count anyway?

There are so many documents and pieces of information that someone deals with on a given day. I actually did stop to think about it, and I was amazed at the amount of information that I pass through on daily basis. Fortunately, >95% of my interactions consist of electronic information.
For some strange statistical reason, I recently wanted to know the number of characters that were contained within a set of text files. These files were basic text documents, that could be viewed with any text-editor. I guess, that was the easy part. Getting the count, well, I couldn’t picture anything better than spending an afternoon with Siruis cranked and a print out of the document and ‘ticking off’ each character.
As mentioned before, I am a huge fan of working efficient (smart) rather than hard. In most cases it is not how you get there; rather getting there that is important. I have had experience working with text editors at different levels and figured that it wouldn’t be too difficult to come up with a basic text-editor to do all the work for me.
This journey’s result -- CharCount. CharCount is a fully functional (basic) text-editor that displays character and word count information. Simply enter or open text and CharCount will display the total number of characters (consonants, vowels and other) along with a sort-able list of words and the frequency of their appearance. CharCount will also display line numbers for reference. I have added this application to the freeware section of the site. Feel free to download it and give it a whirl. If there is anything that you think it needs please feel from to let me know.
This whole concept has also set me down the road thinking of revamping the ‘old’ ANoteWrite. That application hadn’t been touched in a while and I think it could use an overhaul. We’ll see where that leads, if anywhere......

Labels: , ,

posted by Brad Prendergast at 7:49:00 PM (0 comments)
Links to this post
Permalink
Tuesday, October 11, 2005
Access Control: ACL and ACE???

There are numerous folders, files and resources within the operation system. Some you had created and others are created and maintained by the operating system or installed applications. Also, in most corporate environments there typically is a shared (network) location for the storage of corporate files and resources. In either case the sensitivity level of the contents of these files varies. Some files may contain benign information that if anyone accessed or modified wouldn't result in sleep loss or pose any harmful side effects. Other files may be considered safe if accessed by anyone, but catastrophic if anyone but a select few modify its contents. There are also those files that contain information that should only be accessible by certain groups or individuals. After all, we can’t forget those lovely users that will browse through every single file to see what piece of gossip they can get their hands on or what they can change. With a countless number of imaginable scenarios one would hope there was some way to control resource access. Fortunately there is, the Access Control List or ACL.

The Access Control List is a list of security protections that are applied to system resources (files and folders do fall into resources). Each ACL [there are two types: Discretionary (DACL) and System (SACL)] has a list of Access Control Entries (ACE) that define access for Trustees. When it comes to users and groups, the DACL has access entries that basically define whether or not a Trustee has allow (ACCESS_ALLOWED_ACE) or deny (ACCESS_DENIED_ACE) access to the resource. The process of defining all of these goes far deeper than I am going to go.

What about getting information from an established ACLs? Basically determining who has defined access to what. Is there better resource management besides actually reviewing and verifying ACLs for resources? The first thing that is necessary is to obtain the resource's DACL. GetNamedSecurityInfo and GetSecurityDescriptorDacl will get you there. Once the DACL is obtained the next step is to loop through and process each ACE (AceCount tells you how many there are). The ACE_HEADER of an entry determines which AceType (allow or deny) the entry is. Within in each ACE there is a Mask that specifies the level of access (Read, Write, Modify, Execute, etc...) for the entry. Effective and Explicit rights are defined. This is all pretty straight forward and simple once you grasp hold of the concept.

When it comes to systems I am definitely the inquisitive type. Often I find myself in a position where I need or want to audit a file or folder's effective ACL information. I never really found a quick way to do this. I usually resort to selecting a file or folder, then viewing the Security tab of the Properties and scrolling through each Trustee listed. A quick look at this process and I don't think that it can get any more tedious or time consuming. Fortunately, there was a cold and rainy day available for me to think about this and review ACL security and structure. The result: A tool that significantly eases the process. BPACLer is a utility that lists the entries a file or folder’s access control list. The OWNER information is also listed on the ACE display. Try it out and if there is anything that you think would be a nice addition or change to the utility please let me know.

This information in this posting is not intended to guide in or fully explain security at any level. It is merely intended as a superficial exposure to Windows Access Control. Dig deep enough and you'll find a number of in-depth how-to resource security and design materials.

Labels: , ,

posted by Brad Prendergast at 9:34:00 PM (0 comments)
Links to this post
Permalink
Thursday, October 06, 2005
My Send To

I think this will start off with a small digression. Delphi is a wonderful software development language. As time gets closer to another release, the usual ‘future of Delphi’ chatter starts to surface. My personal take on Delphi is that it is one of the most powerful development environments/languages out there. I think it just suffers from a lack of and poor exposure. A lack of knowledge and understanding leads to fear and hostility (or negativity). After all it is easier to criticize and 'bash' something rather than admit you don’t fully understand it or are wrong. On to the original though that got me here ….

The ability to right clicking on a file or folder in Windows Explorer and selecting ‘Send To' to perform some action is a great time saver. What better way to quickly e-mail a file to a colleague There is a downfall to the limit the default options leave you. There are often times when I want to copy a file or folder to another location for backup or distribution purposes. There are also times that I’d like to quickly print and unopened text documents.
Under Windows you can add your own choices to the ‘Send To’ menu option. This is surprisingly easier than one would expect. In order to do this you first need to make sure that you have explorer set to show hidden program or system files. Next, browse to C:\Documents and Settings\<youraccountname>\SendTo. Once you open the Send To folder you will notice that the other send to shortcuts. Place a shortcut to your favorite folders or printers (I find it easier to just drag and drop printers into this folder) in the SendTo folder to have it appear in the list.

Labels: , , ,

posted by Brad Prendergast at 8:33:00 PM (0 comments)
Links to this post
Permalink
Wednesday, October 05, 2005
Straight to the Prompt

Even in the world of Windows it is often necessary to perform tasks via the command prompt. Along with the console applications that I have created, there are many other command line utilities that I use. Often, these utilities need to be run within a specific directory (a.k.a. folder). Instead of opening up the command window and changing to the desired directory, I find it much easier to open up Windows Explorer, right click on a folder select a menu option and have a command window open, already changed to a selected directory (similar to New Date Folder). This option is not a standard part of Windows Explorer but can be added rather easily.


1. Open Windows Explorer
2. Select Tools --> Folder Options
3. Select the File Types Tab
4. Select Folder from the list of Registered file types
5. Click on Advanced
6. Click the New… button
7. Type Prompt in the Action field
8. In the application field you can type one of two lines:
command.com /k cd %1
or
cmd.exe /k cd "%1"
The difference between the two is that the first option will browse with short file name and the second with long file names.
9. Keep clicking the OK button until you are back to Windows Explorer


You can now right click on a folder and easily get to a command prompt in a selected directory.

As always, proceed with caution when changing file types or any system setting. Basically, if you are uncomfortable doing this type of stuff then it might be best if you consult someone that has a high comfort level in making these types of changes.

Labels: , , ,

posted by Brad Prendergast at 3:34:00 PM (0 comments)
Links to this post
Permalink
Tuesday, October 04, 2005
AddrMon Updated

An update to AddrMon (1.0.0.49) has been posted and is ready for download. AddrMon is a FREE network utility to ping, monitor or traceroute a remote host. A number of adjustments have been made to this simple yet powerful application. The biggest change is the addition of the Monitor Grid. The Monitor Grid lets you view a summary of all the hosts being actively monitored. This will eliminate the cluttered window and simplify monitoring when monitoring multiple hosts. For additional information be sure to check out the AddrMon product page.

If you have any feature suggestions or product questions please feel free to post a comment.

Labels: , ,

posted by Brad Prendergast at 8:45:00 PM (0 comments)
Links to this post
Permalink
Monday, October 03, 2005
New Date Folder

I constantly backup and keep revisions of documents stored on my computer. For sorting and identification purposes typically create a folder with name conjured up using the current date and time. I usually create a folder name with the following format: ‘yyyymmdd hhmmss’. This allows me to see exactly when a ‘snapshot’ was taken and they pretty easy to sort in the correct order.

Opening Windows Explorer, browsing to the desired folder, selecting File--> New -->Folder and then renaming the folder, IMHO, takes way too much effort. I find it a lot easier to just open Windows Explorer, right clicking on a folder and then selecting ‘New Date Folder’ from the context menu . This speeds things up significantly and requires a lot less thought.

The ‘New Date Folder’ option can easily be added to your context menu as well. First open up notepad (or your favorite text editor) and enter the following text:

@echo off
SET MONTH=
SET DAY=
SET YEAR=
SET HOUR=
SET MIN=
SET SEC=

SET MONTH=%DATE:~4,2%
SET DAY=%DATE:~7,2%
SET YEAR=%DATE:~10,4%

SET HOUR=%TIME:~0,2%
IF "%HOUR:~0,1%" == " " SET HOUR=0%TIME:~1,1%

SET MIN=%TIME:~3,2%
SET SEC=%TIME:~6,2%

md "%1\%YEAR%%MONTH%%DAY% %HOUR%%MIN%%SEC%"

Save that document some place on your local hard drive as a batch file. The batch ‘datetime.bat’ in the folder C:\Batch is what I will use for this example. Next, open up Windows Explorer and select Tools --> Folder Options from the menu bar. This will open the Folder Options Dialog. Select the File Types tab. Scroll to Folder in the Registered file types list and click the Advanced button. In the Edit File Type dialog click on New. Type New Date Folder in the Action field and cmd.exe /c c:\batch\datetime.bat "%1" in the application field. Click OK on each of the open dialogs until you get back to Windows explorer. You should now be able to right click on a folder and be able to select New Date Folder to create a new subfolder with the current date and time.

One thing to note is that this will not work on network folders unless they are accessed via a mapped drive. Also, you may have to work with the precision on the SET lines in the batch file to work with your system's regional settings.

If you are uncomfortable or unfamiliar with any of the concepts discussed here you should probably refrain from doing this yourself and consulting someone who has a greater comfort level. I am sure you don’t want to inadvertently change anything that could potentially lead you to some computer headaches.

Labels: , ,

posted by Brad Prendergast at 2:22:00 PM (0 comments)
Links to this post
Permalink
Sunday, October 02, 2005
Delphi™ Components:TBPRichEdit Added

TBPRichEdit has been added to the list Delpi Components available for download. TBPRichEdit is a descendant of the native TRichEdit component. TBRichEdit has two additional scrolling events: OnVerticalScroll and OnHorizontalScroll. TBPRichEdit also adds properties (GutterSize, GutterColor, GutterTextColor) that display the TBPRichEditline numbers.

This component was developed due to a need to display line numbers (similar to TBPMemo) for a text listing. There was a slight twist; I wanted to 'colorize' certain text. Initially, my though was that it would only take a few moments to whip out this component, after all, the same code that adds the lines to the BPMemo could be used for a RichEdit. WRONG!
After creating the new component I realized that assigning the RichEdit as the parent of the PaintBox caused, well, issues. The text of the RichEdit was 'not being painted'. It was there. The text could be copied, pasted and cut, just not viewed within the RichEdit. After poking around a bit I did find one interesting tidbit that I had found in the Delphi 2005 help file for the BringToFront Method of a control, 'Note that controls that wrap Windows screen objects (control classes descended from TWinControl) always "stack" above lightweight controls (control classes descended from TGraphicControl).'. This got me thinking (how relevant this is still remains to be seen) about a number of things regarding the way this whole thing was set up and how a RichEdit gets created and painted. After some thought, the easiest way around this was to actually create and TPanel to hold the TPaintBox and then draw the panel over the RichEdit (adjusting for the potential moving and sizing of the RichEdit). One important thing to note, when performing this technique the BorderStyle and HorizontalScrollBar height need to be considered when positioning the panel. Afterall, we want the panel to line up and appear as if it is part of the RichEdit rather than something sitting on top of it. Covering the scroll bar is definitely quick way to screw that up.
At that point I only needed something to display the lines numbers for colored/highlighted text. I do at one point hope to adjust the line number positioning (centered) for the potential varying height of the lines of the TRichEdit. If there is anything else that you think should be added or see within the TBPRichEdit please let me know.

Labels: , , ,

posted by Brad Prendergast at 7:20:00 AM (0 comments)
Links to this post
Permalink
Saturday, October 01, 2005
Is this thing on?

The internet is a wonderful tool. The internet allows for the easy access to literally thousands of source code listings and software applications and utilities. This has proven, IMHO, to be a valuable for increasing efficiency. There are many software utilities, examples and instructions for completing just about anything. If you search around you may find something to help you along your life’s journeys. After all, there are two basic approaches ‘working hard’ and ‘working smart’. These two approaches are not always the same.

Over the years I have created dozens of applications and hundreds of utilities to assist me in my journeys. I have made some of these utilities and various source code listings available for download, with the hope that they will provide some benefit to others, just as they had/do for me. The utilities available are divided into two basic sections: Shareware and Freeware.

The content and layout of this site was due for an overall change. I have recently changed the layout of this site as well as abandoned the discussion forum. Instead of the forum I opted to go with the ‘blog’ approach (it was inevitable that I jump on the bandwagon). I feel the ‘blog’ approach allows for an easier method of communicating product and code updates, examples, problems and solutions. A lot of the examples I intend to take from my everyday experiences (nothing proprietary or intellectually protected will be discussed). I also intend on occasionally posting some random thoughts. I have also made an RSS feed available for these postings. If there is anything that you would like to add or any features or changes that you think should be incorporated in any of the utilities on this site please feel free to leave a comment or e-mail me.

Labels:

posted by Brad Prendergast at 5:28:00 PM (0 comments)
Links to this post
Permalink
Recent Posts
 Command Line: Visual Source Safe
 SQL: Remove / Delete Orphan Users
 SQL Delete/Drop a User from each Database
 Is there an 'I' in phone?
 SQL Optimization: Am I missing any indexes? - Part...
 Meaningful Signature File Quotes
 My Shared RSS Items
 Edit those XML files
 A little System.Diagnostics
 Wi-Fi Detector Shirt


Labels



Archives
 October 2005
 November 2005
 December 2005
 January 2006
 February 2006
 March 2006
 April 2006
 May 2006
 June 2006
 July 2006
 August 2006
 September 2006
 December 2006
 January 2007
 February 2007
 March 2007
 September 2007
 October 2007
 November 2007
 July 2008
 November 2008
Powered by Blogger