Filed under BlackBerry, How To by Dale on March 10, 2010 at 9:27 am
Comments
To reset your BlackBerry, three simple keys are all you need to know.
Left alt, Right shift and Right del. Pressing those three keys, at the same time, will cause your BlackBerry to reset.
(the BlackBerry 9700 pictured has the three keys circled).
Resetting your BlackBerry weekly is a good practice to get into.
“Why?”, you ask?
A reset causes the BlackBerry to restart the operating system, and it frees up memory up as well.
It’s the very first thing I get my customers to do when they tell me their BlackBerry is behaving strangely.

Filed under How To, Microsoft Office by Dale on January 21, 2010 at 7:11 pm
Comments
I was sent a word document with "hidden data" in it.
"Hidden data" in Microsoft Word documents can be one of several bits of information, such as hidden data, change tracking, or even comments on the document.
Comments.
Such as this example:

This problem isn’t just limited to Microsoft Word, oh no. It shows up in Microsoft Excel and PowerPoint too.
The solution for:
Microsoft Office XP/2003? Download the Microsoft Remove Hidden Data add-in, and use it.
Microsoft Office 2007? You already have it. The option can be found under the Office Pearl –> Prepare –> Inspect Document menu item.
This post brought to you by the outside company who shared a comment-enabled document with me.

Filed under Code Cutting, How To by Dale on January 20, 2010 at 7:58 am
Comments
I needed to read the last line of a log file. PowerShell made it very, very, easy.
All you need to do is Get-Content the file, and then pipe it to Select-Object with the –last parameter set to 1.
Here is the code snippet which does that:
$failure_reason = (Get-Content $file_txt | Select-Object -last 1)
And here is a (simple) version of the PowerShell script I wrote to read though a list of computers, and dump the last line to the screen:
$windows2000_PCs = (Get-Content c:\temp\pc-list.txt)
foreach ($computer in $windows2000_PCs)
{
$file_txt = "\\"+ $computer + "\c$\log\install.txt"
$install_result = (Get-Content $file_txt | Select-Object -last 1)
Write-Host $computer has install result of: $install_result
}
Write-Host Done!
Which outputs:
BROOMFONDLE has install result of: Program installed successfully on 21 DEC 2010 – 1000hrs
MAGICTHIGHS1 has install result of: Program failed to install – Error code 1603 on 11 DEC 2010 - 1321hrs
Done!
Things to note:
- c:\temp\pc-list.txt contains the list of computer names you wish to scan.
- the script is not
idiot-proofed error-trapped.
ie. in a production version of this you would check that the computer being scanned is online, the install.txt file exists, and so on.

Filed under Code Cutting, How To by Dale on January 7, 2010 at 12:10 am
Comments
The Windows PowerShell syntax was deliberately chosen to facilitate ease of use and ease of learning. Corporate enterprise Windows administrators are the target audience.
- Windows PowerShell Scripting Guide by Ed Wilson, Microsoft Press.
I’m teaching myself PowerShell at the moment, because:
- it’s the future of Windows scripting.
- I had 1400+ computers I needed to check for a particular file, and it looked easier with PowerShell.
Future of Windows scripting.
Back in the dark ol’ days, if you needed a script created on DOS and Windows, your choices were DOS Batch, and DOS Batch. This changed in 1991 with KiXtart. KiXtart was created by a Microsoft employee, to provide corporate IT types with more robust logon scripting.
Like the 9 headed Hydra, KiXtart blossomed. And got into places where it shouldn’t have gone. I know of one 4000+ desktop company using it for software deployments. Erkkkk! Imagine how much spaghetti code there would have been in that.
Then VBscript. VBscript was trumpeted by Microsoft in 1998 as the better/new way forward. One Windows IT Pro writer said in 2001:
VBScript, one of the most powerful and underused features in the Windows environment, provides the same powerful programming tools (e.g., variable support, structured program control, the ability to leverage COM objects) that you’ll find in full-featured development languages.
It was that very powerfulness which caused some security problems with VBscript (mis)use. So Microsoft threw the baby out with the bath water and created PowerShell to address those security issues. Sure there are some other advantages to PowerShell, such as speed, and that it’s going to be how you script/interact with new Microsoft products.
Those 1400+ computers?
The script worked well. Here is the cut down version:
$windows_PCs = (Get-Content c:\temp\pc-list.txt)
foreach ($computer in $windows_PCs)
{
$file_exist_path = "\\"+ $computer + "\c$\data\fred.txt"
$file_exist_OK = (Test-Path $file_exist_path)
if ($file_exist_OK)
{
write-host $computer has the fred file
}
else
{
write-host $computer is missing the fred file
}
#endif - PowerShell does not use EndIf statements, so I put this here as a boundary.
}
#next - PowerShell doesn't have a next statement either.
Output:
CATBERT has the fred file

Filed under How To, Other Blogs by Dale on January 6, 2010 at 12:10 am
Comments
This was originally a post at Laffers.net, but I’m getting constant timeouts to that site, so I’m going to repost it here, just in case Laffers.net has gone down.
This copy was captured by the Google Cache as it appeared on 24 Dec 2009 04:44:07.
I refer to this article in the following two posts of mine:
So you want to move from Blogger to a WordPress blog & Things I learnt when migrating from Blogger
If you are like me and have decided to move your blog from blogspot.com to wordpress.com (the shared Wordpress hosting site), you are asking yourself three questions:
- How to redirect visitors to the old blog automatically to the new pages.
- How to transfer the PageRank of your old blog to the new one.
- How to prevent being penalized by Google for duplicate content.
Is it possible ? Read on.
First of all, let me give credit where credit is due – there are some instructions already published
- Tom Sherman has a nice manual for moving from the old Blogger to self-hosted Wordpress.
- TechCounter similar to the one above but contains erroneous information about preserving PageRank.
- Webbleyou is a tutorial for migrating from Blogger Beta, but I find it unnecessarily complicated.
Bottomline: None of those tutorials work for moving to the shared hosting on Wordpress.com!
how to do it
Here are the answers to the three questions:
- Redirect your visitors by combining JavaScript and meta tag redirects. Read below.
- Bad news, this is not possible. Tom Sherman correctly states
This would require a 301 Permanent Redirect and access to the server, not provided by Blogger.
- If you don’t want to be punished by Google for duplicating content you must remove the old blog from the Google cache and tell it to ignore the old site from now on. Read below below.
set up redirects
I’m assuming that at this point you have imported your posts to the new blog at Wordpress.com (if not, go to "Manage/Import", select the obvious choice and do what you’re said).
Log into your Blogger account and click your way through the awkward navigation menu until you are at the "Template/Edit HTML" page. To redirect visitors from the main page, insert the following between the <head> and </head> tags:
<meta content='6;url=http://yournewblog.wordpress.com/' http-equiv='refresh'/>
Number 6 means that the redirection will take effect after 6 seconds. Replace the url with your own.
The tricky part comes now. We want to redirect users from individual post pages to the corresponding post pages on the new blog. For that, we need a piece of JavaScript spiced with Blogger proprietary tags. Insert the following right after "<b:section class='main' id='main' showaddelement='no'>" in the template:
<b:widget id='Redirector' locked='true' title='Blog Posts' type='Blog'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "item"'>
<b:loop values='data:posts' var='post'>
<script type='text/javascript'>
var new_page='yournewblog.wordpress.com/';
var permalink = '<data:post.url/>';
var timestamp = '<data:post.timestamp/>';
timestamp = timestamp.split('/');
timestamp = timestamp[2]+'/'+timestamp[0]+'/'+timestamp[1];
new_page = permalink.replace(/youroldblog\.blogspot\.com\/2007\/[0-9]{2}/,new_page+timestamp);
new_page = new_page.replace(/\.html$/,'');
document.location.href = new_page;
</script>
</b:loop>
</b:if>
</b:includable>
</b:widget>
Don’t forget to enter your new blog’s URL at var new_page = .
Important note! For this script to work, all your posts should have been imported to Wordpress.com using their Manage/Import function. The creation dates of all posts must match, because they are part of the permalinks.
remove duplicate content
Insert the following between the <head> and </head> tags:
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW"/>
After seeing this, search engines should remove your old blog from their cache and the old content will stop existing for them. Therefore they are not going to penalize your new blog for duplicate content.
optionally, display a message
This is not required, but helpful for your readers. Tell them that you have moved and that they are going to be redirected. Right after the <body> tag, insert this:
<div style='position: absolute; top: 30px; left: 30px; border: solid 2px #333; color: #000; background-color: yellow; padding: 5px; width: 400px; z-index: 5; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: large;'>
<p><strong>My blog has moved!</strong></p>
<p>You should be automatically redirected in 6 seconds. If not, visit<br/> <a href='http://yournewblog.wordpress.com/'> <strong>http://yournewblog.wordpress.com</strong></a> <br/> and update your bookmarks.</p>
</div>
Well, now we are set. Found any errors in this tutorial or have more tips? Share them in the comments please.

Filed under Excel, How To by Dale on January 4, 2010 at 12:10 am
Comments
The question was:
Need to create series with dates in intervals of 6 weeks 24 weeks and 52 weeks. want it to be set to do it automatically. Can anyone help me?
The answer is simple. You can use the Excel Date functions to do this:

To break down what is happening here, using “24 weeks from today”, as an example.
The formula is
=DATE(YEAR(B2),MONTH(B2), DAY(B2)+168)
=DATE(2009,MONTH(B2), DAY(B2)+168)
=DATE(2009,12, DAY(B2)+168)
=DATE(2009,12,29+168) <- (168 days equals 7 days time 24 weeks)
=15 June 2010
Update:
Another way to do this is by using the TODAY verb.
ie. =TODAY()+168
(with thanks to The Angry Technician)

Filed under Documentation, Hardware by Dale on December 26, 2009 at 2:04 pm
Comments
Everyone I’ve shared this poster:
with, has said, “Where did you get it?”
Right here:
sonic84.com and sonic84 @ deviantart.com

Filed under How To by Dale on November 24, 2009 at 12:10 am
Comments
The user reported
In Lotus Notes, when I create an attachment, I click on "My Documents" shortcut, and it should take me to My Documents folder.
BUT Lotus Notes is adding it as an attachment instead."
Indeed it is.
Fixed in Lotus Notes 6.5.1, with a setting added to the Notes.INI, FIRE PHASERS SHELL_LINKS=1.
SHELL_Links=1 will cause Lotus Notes to treat the shortcut as a link.
Here’s a summary of how Lotus Notes client behave:
| Notes version |
Change type |
Change |
| 6.0.4 |
Notes.ini |
SHELL_LINKS=1 |
| 6.5.1 |
Notes.ini |
SHELL_LINKS=1 |
| 7.x / 8.x |
fixed by default, changeable via GUI and Notes.ini |
NO_SHELL_LINKS=1 |
| 8.5.x |
fixed by default, changeable via GUI and Notes.ini |
NO_SHELL_LINKS=1 GUI change is in File / Preferences / Basic Notes Configuration |
About FIRE PHASERS: While I was typing this out, I suddenly remembered the FIRE PHASERS Novell login script command. I was thinking it would make a good age test for any of your Novell techs.

Filed under How To, Utilities by Dale on September 3, 2009 at 1:10 am
Comments
The Microsoft Sysinternals PsInfo utility can do that for you. PsInfo is a command-line tool that gathers key information about the local or remote Windows system.
Today’s example is how to get the operating system version for a list of computers, such as this list:

So to get the information, we use PsInfo like this:
(more…)
Filed under How To by Dale on January 6, 2009 at 12:05 am
Comments
Via the Greek Guru, Peter Kammas:
In case you didn’t already know it, you can use .reg files to also REMOVE registry keys and/or values…
To do so, create a .reg file as follows:
Removing a registry key:
REGEDIT4
[-HKEY_LOCAL_MACHINE\SOFTWARE\DANADAWG]
(note the minus sign before the key name… this will remove the entire key, including subkeys and values, without prompting: so be careful)
Removing a registry value:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\DANADAWG]
"Kennel Patch Install Date"=-
(note the minus sign after the equals sign on the value(s) you want to remove… this will only remove the value(s) specified)
Then it’s just a simple matter of executing the changes with a regedit /s <.reg file>
Note: Microsoft have documented this in How to add, modify, or delete registry subkeys and values by using a registration entries (.reg) file

Recent Comments