Blog: General

The other day I was setting up a scheduled task on a 2008 server using Microsoft's "new" task scheduler.  The task scheduler is pretty robust with lots of bells and whistles, but I ran into a subtle problem with the "Start-in" field on the "application to run" section.  When setting up my task, I had used the Shift+Right Click feature to "Copy as path" the folder where my script was located.  When using this feature the copied path is contained within double quotes (regardless of if there are spaces in the path).  The problem is the "Start-in" field cannot contain quotes.  If it does, your scheduled task will fail to start.

Thankfully, the error code returned quickly led me to the following article: http://www.arcomit.co.uk/support/kb.aspx?kbid=000058.  Once I removed the double quotes everything worked great.


 

Have you noticed how Windows Explorer sorts files with numbers in their name not how you would expect?  If you have items named IE4, IE401, IE5, you would expect them to be listed like this:
IE4
IE401
IE5

Instead, they are listed like this:
IE4
IE5
IE401

This is a little strange, since this sort order is used nowhere else by default.  Windows lists the entries in this order because the number 401 is larger that 5.  I got tired of this, so I finally did some searching and found an old Microsoft Knowledge Base article from 2007, http://support.microsoft.com/kb/319827, which still works on Windows 7.  You just create this registry entry: [more]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoStrCmpLogical"=dword:00000001

P.S.  There is -v option to the ls program on most UNIX type systems to sort directory output like this.  The v is for version - to list files with version numbers in order.


 

The growth of the cloud is ever expanding and people are creating new services allowing you to connect to your data and resources from essentially anywhere in the world. The latest addition to cloud services is Google Cloud Print (http://www.google.com/chrome/intl/en/p/cloudprint.html) and I've been playing around with it at home. This beta service allows you to print to your printer from any computer or smart phone, regardless of your location.

The main requirement is Chrome version 9.0.597.1 (or greater) on the computer connected to your printer.  Once installed, enable the Google Cloud Print connector in Google Chrome. When you enable that setting your printers are “shared” with your Google account and available for use.

Currently only available for your mobile browser and for Google Docs or Gmail, to use this service, simple expand the menu and click Print on a message or click the “Print” link that appears next to the attachments. Here is what it looks like from a mobile browser: [more]

A window will appear letting you know what printers are available.

Simply select one and your document will be submitted for printing!


 

I recently got very annoyed that I couldn’t open 2 instances of Excel.  After a little bit of research, I found out if you open up Excel and go to File -> Options -> Advanced, scroll down to the bottom, and underneath the General section check the “Ignore other applications that use Dynamic Data Exchange” option.  Here is a screen shot of the setting:


 

Within Microsoft Word, there is a feature to split a document screen into two sections so you can view two parts of a document at the same time.  To split the screen, double click on the small rectangular box located above the vertical scroll bar (see figure 1).  You can resize the panes by holding down the left mouse button (when the mouse is hovered over the split box), and dragging the split box up or down (see figure 2).  To remove the split screen, simply double click on the split box. [more]


Figure 1


Figure 2


 

A local computer consulting client started getting this error every time she tried to close Word or Excel:

The instruction at “0x01003ce4” referenced memory at “0x00000018”.  The memory could not be “read”.  Click on OK to terminate.  Click Cancel to debug the program.

I did a quick search and only saw errors about Office Live Sign in and thought that couldn't be it.  I went on site to remove and reinstall Office.  I first reproduced the error and saw that the message box had "OfficeLiveSignIn.exe - Application Error." in the heading.  The user was using the Office Live messenger instant messaging client.  It had installed an addon to Word and Excel.  Disabling this addon fixed the problem.


 

Log Parser 2.2 is a free command line tool available from Microsoft.  It provides universal query access to text-based data such as log files, XML files, and CSV files.  It also can query Windows system data sources such as the Event Log, the Registry, the file system, Active Directory, and NetMon captures.  You can pick the information you want returned in the results and those results can be sent to a text file, SQL Server, or SYSLOG.  This tool basically reads your log files and lets you query them as if they were in a SQL Server database.  It is also light weight at only 1.4 MB download.

The possible uses for the Log Parser are endless, but I use is specifically for querying IIS logs when trouble shooting problems.  For example, using this tool makes it easy to find all the requests made by a specific signed in user.  Since this application is ran at the command like it can take a little time to get your query right, but after you get it working you can add the commands to a .bat file for future reference or scheduled tasks.  Here are some examples: [more]

Search IIS Logs for User Requests
Here is an example batch file that when run searches a directory of IIS log files for all requests made by users signed in with a username ending in “@example.com” and saves the results to a text file:
cd "C:\Program Files\Log Parser 2.2\"
logparser.exe "select logrow, date, time, c-ip, cs-username, cs-method, cs-uri-stem, cs-uri-query from ‘< your log directory path>\*.*’ where cs-username like '%%@example.com%%' order by date, time, logrow" -i:IISW3C -rtp:-1 > c:\temp\example-requests.txt

Search IIS Logs for Most Download Files
cd "C:\Program Files\Log Parser 2.2\"
logparser.exe " SELECT TOP 10 cs-uri-stem, count(*) as Downloads FROM ' from <your log directory path>\*.*' GROUP BY cs-uri-stem ORDER BY Downloads DESC" -i:IISW3C > c:\temp\most-downloaded.txt

Find 10 Largest Files in a Directory or Subdirectory
cd "C:\Program Files\Log Parser 2.2\"
logparser.exe " SELECT TOP 10 Path, Name, Size, Attributes FROM 'C:\Program Files\*.*' ORDER BY Size DESC"  -i:FS –Recurse:-1 > c:\temp\10-largest-program-files.txt

Get Number of Outbound Emails from Exchange
logparser.exe "SELECT connector-id, client-hostname, COUNT(*) AS Total INTO c:\temp\outbound-email-totals.csv FROM '<log file directory>\MSG*.log,<another log file directory>\MSG*.log' WHERE connector-id LIKE '%outbound' OR connector-id LIKE '%to Internet' GROUP BY client-hostname,connector-id WITH Rollup"  -i:CSV -nSkipLines:4 -o:csv

This is a very flexible tool.  There are tons of parameters that control how the application functions and the number of different queries you could write is only limited by your imagination.  I’ve found the best way to get started using it is to look at examples and there is a “Samples” folder included in the install directory that is helpful.

Related Links
Home Page (http://www.iis.net/community/default.aspx?tabid=34&g=6&i=1976)
Log Parser 2.2 Documentation (http://www.iis.net/community/default.aspx?tabid=34&g=6&i=1976)
Download (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en)
TechNet Article (http://technet.microsoft.com/en-us/library/ee692937.aspx)
Other examples of IIS log queries (http://blogs.iis.net/carlosag/archive/2010/03/25/analyze-your-iis-log-files-favorite-log-parser-queries.aspx)
Log Parser Forums (http://forums.iis.net/default.aspx?GroupID=51)
Graphing Ping Results (http://www.adopenstatic.com/cs/blogs/ken/archive/2005/05/30/22.aspx)
Query Windows Event Log (http://oreilly.com/pub/a/windows/2005/07/12/logparser.html)


 

After listening to a security podcast about Flash security, I decided to change some of my settings. You can do this by going to the Adobe Flash Player Settings Manager web page and clicking on the tabs to disable features.  One of the settings I disabled was "Allow third-party Flash content to store data on your computer". [more]

Adobe Flash Player Settings Manager

One thing I noticed after I disabled the "Allow third-party Flash content to store data on your computer." option was videos at some sites like CNET stopped working. This was happening regardless of which browser I tried, so I suspected a problem with Flash.  But other Flash content worked like YouTube.  Eventually, I remembered changing the Flash settings and re-enabled the third-party Flash content to fix the problem.


 

After the December 2010 Internet Explorer 8 updates I was seeing some strange behavior for a couple sites including gotomeeting.com.  Users could get to the first page, but if they clicked on any of the links they would get a page cannot be displayed error.  It appeared like the user could browse to the first page via the proxy, but all subsequent pages were being sent direct. 

It turns out the IE8 updates changed the behavior of the WPAD script that we were using and we had to edit the following line:
proxy = "PROXY proxy.company.com:8080; DIRECT";

We had to change it to look like:
proxy = "PROXY proxy.company.com:8080";

After making this change the sites in question began to work.


 

We recently encountered a terminal server user who said they were in Outlook and accidentally hit some keyboard combination that caused it to close.  When they tried to get back into Outlook it kept giving an error message.

When I connected and tried to run Outlook, it kept displaying an error message that there was no Outlook Profile setup.  However, when I checked the profiles there were in fact several profiles listed.  I tried creating a brand new profile, but still received the error message.

I had the user log off and back on to the terminal server, checked outlook from my account to make sure it wasn’t something server wide, and then I checked the actual outlook.exe under the Program Files directory.  I did not see anything checked for compatibility with my account, but when I checked the outlook.exe from her account, it had Compatibility Mode for Windows 95 checked. [more]

My assumption on what happened is that outlook crashed, came back up, and asked if it should be run in compatibility mode.  I am assuming the user said yes at this point, and it turned the option on which caused outlook to not work anymore.