Windows

You are currently browsing the archive for the Windows category.

We’ve finally gotten a built-in tool in Windows to capture those screenshots for blogging/documentation/whatever purposes.  And it has been given the magical, oh-so-logical name of Snipping Tool!

Update: I’m aware that Vista already contained this tool.  But I’m one of those guys who managed to stay away from Vista so to me it’s new :-)

Let’s see if I can capture what it looks like by using the tool itself.  Hmm, I can’t…  Which is probably quite logical as it shouldn’t get in the way when you want to capture a screenshot of something.  What you want to see then is anything but the actual tool used to do it, right??

I’ll go for the old-fashioned way then: ALT + Print Screen (it captures the active window).

Windows 7 Snipping Tool - Capture those screens!

In that screenshot I’ve demonstrated a couple of its features.  It comes with a Pen that you can customize a bit into several colors and thickness.  You’ve also got a marker tool called Highlighter – that’s the yellow part.  And there’s an Eraser tool to remove any markings or pen editions you’ve made previously.

Another feature that’s not shown but that’s really useful is that the screenshots are automatically copied to the clipboard.  But you can switch that off through the options if you don’t like it.

Snipping Tool Options

I would have hoped that a couple more features had been included, such as the ability to draw arrows without needing to use a freehand tool (as shown in screenshot above), and a Rectangle/Ellipse tool for some extra markings.

Anyway, what this means as far as I am concerned is that I no longer need to install my favorite screen capture tool (I’ve used a couple over the years but the last one was Screen Hunter).  But for editing some screen captures I’ll still need to resort to my favorite image editor (paint.net).

Where is it located? Well, Start Button > Snipping Tool.  At least, that’s where I found it in my Windows 7 Enterprise edition.

What’s the hotkey? It’s CTRL + Print Screen.

How do you use the hotkey?? From the moment that you start up the application, it wants to make a screen capture.  What this means is that your mouse pointer changes into a crosshair whenever it goes outside the Snipping Tool window.  All you now need to do is hit the ESC button.  Then switch to the application that you’d like to capture, possibly opening up a menu.  With everything in place just as you want it captured, hit CTRL + Print Screen.  There’s your crosshair again.

Have fun!

Valentino.

  • Share/Bookmark

Tags:

Owkay, I’ve got a good one for you this time.

And all it takes is checking a checkbox, just one checkbox!

That’s the solution to a problem with which I’ve been struggling yesterday.  What problem?  Let me tell you.

I’ve been installing Master Data Services (MDS) on my SQL Server 2008 R2.  This feature will not only create a database but also a website which you can use to manage MDS.  And it’s the website part that I had a problem with.  Everything installed just fine but when I tried to load the site in Internet Explorer 8 on my Windows 7 64-bit machine, I got the following error:

HTTP Error 401.2 – Unauthorized

You are not authorized to view this page due to invalid authentication headers.

Great, an authentication problem – aren’t those our favorite ones?  And like any decent developer, I didn’t waste my time reading all the text on the error page and started investigating the issue.  I had a look at the settings of the Application Pool and those of the Default Web Site.  I also tried changing the security settings in IE.  At the end I think I have tried every possible setting in IIS 7.5 (which is the version that ships with Windows 7), but I kept getting that same error.

I let some time pass (not on purpose but because we were going to visit my parents-in-law) and in the evening I decided to have another look.  This time I took the effort of reading everything mentioned in the error:

HTTP Error 401.2 - Unauthorized

Do you see that blue link down at the bottom, which I’ve marked with a red rectangle?  That’s where I got the answer from!  Clicking it opened up the following Microsoft Support page: Error message when you try to visit a Web page that is hosted on IIS 7.0: "HTTP Error 401.2 – Unauthorized".

Sounds familiar doesn’t it?  Okay, it’s meant for IIS 7.0 but works for 7.5 as well.

I solved my problem by applying Resolution 1.  In short: IIS was running without the Windows Authentication module installed!  Apparently that is not installed by default when you activate Internet Information Services through the “Turn Windows features on or off” window.  Here’s a screenshot showing what needs to be added:

Activating Windows Authentication for IIS 7.5 in Windows 7

Once that was set up I was able to load the MDS application:

Master Data Services Home Page

If you’re looking for instructions on how to install and configure Master Data Services, have a look at this article at the Master Data Services Team blog.

(Do I need to mention that this was the first-ever web application that I tried running on Windows 7? :-) )

Have fun!

Valentino.

  • Share/Bookmark

Tags: , , , , ,

This is an old one but I keep needing it every once in a while.  Every time when I start using a new machine running Windows XP to be precise.  So I thought I’d post it here so next time I don’t need to spend five minutes looking to find the right page.

Recently I needed to find all SSIS packages that were using a particular view and I performed a Windows Search on all .dtsx files in my project’s folder, searching for the view’s name.  And it didn’t give me any results even though I knew there were a couple of packages that were using it.  Is the search broken?

And then I remembered: no, it’s not broken.  Let’s just say that XP’s default settings are not ideal for developers (or power users in general I’d say).  By default XP does not search all file types!  And it’s a feature, not a bug!

Anyway, luckily the “fix” is not that complicated.  My preferred way of fixing this is Method 2 in this Microsoft Support article: Using the “A word or phrase in the file” search criterion may not work.

Interesting to know, this is not a feature in Windows XP only, Windows Server 2003 got it as well.

  • Share/Bookmark

Tags:

I’ve had the pleasure of seeing the following string in the Status Bar of my Explorer window while the focus was on the C: partition:

Disk free space: 0 bytes

This was after I got several error messages when logging on.  There was not enough space free to load my profile.  And that happened after I rebooted my machine because it had installed a batch of updates.

I was happy to see that even with all those errors, I could still get into Windows (XP SP3) – okay, it didn’t load my background picture nor my favorite Explorer settings but who cares at that point – and free up some space.  After doing that I rebooted and logged on again using my profile, this time it did load successfully.

As you may tell, I have been having space issues for a while now.  Here are some tips that you can use if you want to free up space on the C: partition of a Windows XP installation.

Run Disk Cleanup

In case you’re not familiar with this tool, have a look at this article at The Elder Geek, or this Microsoft KB article.

I run this occasionally, especially right before starting a defragmentation.  To defragment my drives I use JkDefrag which does it quite nicely btw.

Compress Folders

If your partition is formatted using NTFS, you have the option of compressing your folders.  This is an easy solution but usually it doesn’t really give that much extra space.  Unless you are storing a lot of large text files on your C: partition.  Anyway, currently I have both my \Program Files\ and my \Documents and Settings\ folders compressed.

Beware though: SQL Server does not like its folders compressed.

Move Swap File

If you haven’t done so already, an easy way to free up space is to move the pagefile.sys to another partition.  See the How to move the paging file in Windows XP KB article for more info.

My paging file is on the D: partition.

Reduce Space For System Restore

Here’s an interesting article about how the System Restore functionality uses harddisk space.  Now you know why you see the balloons popping out of the System Tray when you’re in a space race :-)

The fastest way that I can think of to change the space usage settings are: Windows Key + Break > System Restore tab > select drive > Settings button.

As I recently ran out of space on the C: partition, practically all my restore points are gone already.

Good information about the System Restore tool is available here on Tech Republic.  With that info you’ll be able to decide how to adjust your settings.

Remove Backup Folders

Hotfix Uninstall Folders

When Windows updates are installed, for each hotfix there will be a backup folder.  You’ve probably already seen them.  Under C:\Windows there are some folders called $NtUninstallKB123456$, or similar.  You can even recognize the Knowledge Base number in the folder name.

These folders are only needed in case you want to uninstall a certain hotfix.  Until now I never needed to do this.  But still, to be safe, I keep the ones that have been installed recently, the last 3 months for instance.  The rest, I delete.

More info on these folders: http://windowsxp.mvps.org/Hotfix_backup.htm

Service Pack Uninstall Folders

Similar to the hotfix folders, backup folders are being created when installing a Windows XP Service Pack.  The folder that you may remove once you’ve decided that you will never want to uninstall your Service Packs is called $NtServicePackUninstall$.

Here’s a good Microsoft KB article about How to Remove Windows XP Service Pack 1 Folders.  Although it’s aimed at SP1, it still applies if you’ve installed SP3.  I have deleted all folders that contained “$NtServicePackUninstall” in their name.

Another good read on this topic can be found on Tech Republic, where the writer covers a backup procedure in case you change your mind afterwards.

SQL Server Hotfix Backup Folders

Again similar to the Windows hotfix folders, hotfixes for SQL Server create uninstall folders as well.  The folders that you may find back on your machine (depending on what components you’ve got installed) are:

  • SQL9_KBxxxxxx_ENU
  • SQLTools9_KBxxxxxx_ENU
  • RS9_KBxxxxxx_ENU
  • OLAP9_KBxxxxxx_ENU
  • DTS9_KBxxxxxx_ENU
  • NS9_KBxxxxxx_ENU

These folders are for SQL Server 2005 and depending on what hotfixes you have installed you may have several similar folders with different KB numbers (the xxxxxx stands for a number).

I couldn’t find an article to support this part of my blog item, but here’s a short discussion about it with a comment from a Microsoft representative.

I removed them all.  (Please do note that this is not on a production environment.)

Internet Explorer Update Backup Folders

Just like the uninstall folders mentioned earlier, patches for Internet Explorer are creating backups as well.  On my machine I could find the following two folders:

  • ie7updates
  • ie8updates

If you don’t plan on uninstalling Internet Explorer 7/8, it should be safe to delete the content of these folders.  But I couldn’t find an official statement to confirm this.  If you know of an article that covers this please do let me know!

Until now I have not yet deleted these myself.

Remove SQL Server Setup Log Files

When performing installation changes to your SQL Server installation, including upgrades, several log files are created.  These files are located under C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG for SQL Server 2005 and C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log for SQL Server 2008.

Check out the Books Online for info on how to view and how to read these setup log files.

If you’re not in the middle of performing installation changes and all your previous changes were successful then it’s safe to remove the content of this log folder.

More info on this folder related to security can be found in this MSSQLTips article.

Resize The Partition

If with all of the above you’re still struggling for space, only one option (besides a full re-install) remains: resize the partition!

I wasn’t aware of a free tool that could do this until one of my friends told me about EASEUS Partition Master (thanks btw :-) ).  If you need it professionally or you have a 64-bit machine, check out the Professional Edition.

With this tool I was able to first make my D: partition smaller and then increase the size of the C: partition.

Conclusion

And Windows XP ran happily ever after…

Disclaimer: I hope it’s obvious for everyone that several of the manipulations mentioned above are not without any risk and should only be performed when you know what you’re doing.  And not in a production environment.  And only when you’re desperate (well, maybe not really but it helps) :-)

  • Share/Bookmark

Tags: ,

© 2008-2010 A Developer's Blog All Rights Reserved