Just a short, simple blog for Bob to share his thoughts.
02 May 2010 • by Bob • Windows
I put together this list for my brother when Windows 7 launched. I got the information from a variety of sources, thereby living up to the old adage that "Copying from one person is plagiarism, copying from a hundred people is research." Some of these are new to Windows 7, while others have been around a little while. In any event, here are some notes that explain how to interpret the keystrokes:
Shift+Click | Open a new instance of the program |
Ctrl+Click | Cycle between windows in a group |
Middle Click | Open a new instance of the program |
Ctrl+Shift+Click | Open a new instance of the program as Administrator |
Shift+Right-Click | Show window menu |
Alt+F4 | Close the active window |
Alt+Tab | Switch to previous active window |
Alt+Esc | Cycle through all open windows |
Win+Tab | Flip 3D |
Ctrl+Win+Tab | Persistent Flip 3D |
Win+T | Cycle through applications on taskbar (showing its live preview) |
Win+M | Minimize all open windows |
Win+Shift+M | Undo all window minimization |
Win+D | Toggle showing the desktop |
Win+P | Open the projection menu (generally used for laptops connected to projectors) |
Win+[Up] | Maximize the current window |
Win+[Down] | If the current window is maximized, restore it; if the current window is restored, minimize it |
Win+[Left] | Dock the current window to the left half of the screen • If it is already docked left, it is moved to the right half of the screen • If it is already docked right, it is restored to its original size |
Win+[Right] | Dock the current window to the right half of the screen • If it is already docked right, it is moved to the left half of the screen • If it is already docked left, it is restored to its original size |
Win+Shift+[Left] | Move current window to the left monitor (with dual monitors) |
Win+Shift+[Right] | Move current window to the right monitor (with dual monitors) |
Win+Home | Minimize all but the current window |
Win+Space | Peek at the desktop |
Win+[Plus sign] | Zoom in |
Win+[Minus sign] | Zoom out |
Win+1 | Open the first program on your Quick Launch bar |
Win+2 | Open the second program on your Quick Launch bar |
Win+n | Open the nth program on your Quick Launch bar |
Win+U | Open the ease of access center |
Win+F | Open the search window |
Win+X | Open the Mobility Center |
Win+E | Open Explorer |
Win+R | Open the Run window |
Win+B | Move focus to notification tray (the right-most portion of the taskbar) |
Win+Pause | Open the System Properties portion from the Control Panel |
Ctrl+Shift+Esc | Open Windows Task Manager |
Win, [Right], Enter | Shutdown |
Win, [Right], [Right], R | Restart |
Win, [Right], [Right], S | Sleep |
Win, [Right], [Right], H | Hibernate |
Win, [Right], [Right], W | Switch Users |
Win+L | Locks computer |
Alt+[Left] | Go back |
Alt+[Right] | Go forward |
Alt+[Up] | Go up a directory |
Alt+D | Move focus to address bar |
Alt+D, Tab | Move focus to search bar |
Alt+Enter | Open the Properties window of the current selection |
Ctrl+Mousewheel | Change the view type (extra large, small, list view, detail, etc.) |
Alt+P | Show/hide the preview pane |
23 September 2009 • by Bob • IIS, FTP, Windows
One of my coworkers, Vijay Sen, just forwarded the following eWeek review of IIS 7.5 to me:
The review was written by Jim Rapoza, and he said some great things about IIS 7.5, which ships with both Windows Server 2008 R2 and Windows 7 client. But what really made my day was the following things that he said about FTP 7.5:
Another welcome change in IIS 7.5 is the elevation of FTP as a full-fledged part of the server. In previous versions, setup and management of an FTP server in IIS were done pretty much separately from Web server management. In IIS 7.5, FTP administration is fully integrated into the IIS Management Console.
I found this to be a very good implementation of FTP, making it possible to quickly set up secure FTP servers and tie them to my Websites. Especially nice was the ability to easily use virtual host names for the FTP sites. All in all, the FTP implementation in IIS 7.5 is one of the best I've seen, even when compared with dedicated FTP server products.
It's great to see all of our hard work being recognized!
My thanks once again to everyone on the FTP and IIS feature teams that helped make this version of the FTP service: Jaroslav, Emily, Daniel, Umer, Suditi, Ciprian, Jeong, Dave, Andrew, Carlos, Brian, Wade, Ulad, Nazim, Reagan, Claudia, Rick, Tim, Tobin, Kern, Jenny, Nitasha, Venkat, Vijay. (I hope that I didn't leave anyone out!)
Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/
24 December 2008 • by Bob • Windows
Some time ago a friend of mine gave me a bunch of JPG files, but for some reason she had two copies of every image in the collection. The names of the images had all been randomized, and since there were hundreds of files in the collection it would have taken hours to find and delete the duplicates. With that in mind, I wrote the following batch file that loops through the collection of files and does a binary comparison to find and delete duplicate files.
To use the example code, copy the batch file code from below into Notepad and save it as "_del_dupes.cmd" in the folder where you have duplicate files
Note: As with many utilities that I write - this is a destructive operation, meaning that it will delete files without prompting, so you should always make a backup just in case something goes terribly wrong... ;-]
@echo off dir *.jpg /b > _del_dupes.1.txt for /f "delims=|" %%a in (_del_dupes.1.txt) do ( if exist "%%a" ( dir *.jpg /b > _del_dupes.2.txt for /f "delims=|" %%b in (_del_dupes.2.txt) do ( if not "%%a"=="%%b" ( echo Comparing "%%a" to "%%b"... fc /b "%%a" "%%b">NUL if errorlevel 1 ( echo DIFFERENT ) else ( echo SAME del "%%b" ) ) ) ) ) del _del_dupes.?.txt
30 October 2006 • by Bob • IIS
The momentum for IIS 7 is gradually building, and I keep seeing great things in the press and several blogs about it. You can read a few details below:
IIS 7 contains a number of great features, and there are a couple of ways that you can get your hands on it for testing without installing the Vista or Longhorn Beta:
Have fun!
11 June 2002 • by Bob • Windows
Many years ago I put together a bunch of information about logging system activity in W3C format by using Group Policy Objects and Windows Script Host. All of that information was supposed to become Microsoft KB article 324414, but I changed teams and I eventually lost track of its status. Recently I had a need for the information in that KB article and discovered that it was never published, so I had to look for my notes to reconstruct what was supposed to be in the KB article, and I thought that all that effort would make a good blog post.
(Note: This blog post has been updated a few times since it was first posted in order to keep it up-to-date.)
The steps in this blog post will show you how to configure your network for additional logon/logoff information for all domain clients by using a sample Windows Script Host (WSH) script to create log files that conform to the W3C Extended Log File (ExLF) Format.
The W3C Extended Log File Format is currently used on Windows servers by the various web services that install with Internet Information Services. These log files are kept in your %SystemRoot%\System32\LogFiles or %SystemRoot%\Inetsrv\Logs\LogFiles folder. By configuring this sample logging script through a domain-level Group Policy, a new folder named Activity will be created under the %SystemRoot%\System32\LogFiles folder containing log entries formatted like the following example:
#Description: Log file for all LOGON/LOGOFF activity #Date: 2002-01-01 21:28:50 #Fields: date time s-computername cs-username cs-method 2002-01-01 21:28:50 MYCOMPUTER LOCALHOST\SYSTEM STARTUP 2002-01-01 21:32:55 MYCOMPUTER MYDOMAIN\userone LOGON 2002-01-01 21:45:58 MYCOMPUTER MYDOMAIN\userone LOGOFF 2002-01-01 21:47:00 MYCOMPUTER MYDOMAIN\usertwo LOGON 2002-01-01 21:52:02 MYCOMPUTER MYDOMAIN\usertwo LOGOFF 2002-01-01 21:53:09 MYCOMPUTER LOCALHOST\SYSTEM SHUTDOWN
Since there are a wide variety of applications that can process log files in the W3C Extended Log File Format, recording logs in this format allows domain administrators to use tools they are already familiar with when analyzing network logon/logoff information.
NOTE: The W3C Extended Log File Format requires that all times must be kept in Greenwich Mean Time (GMT). As such, all logon/logoff activity recorded by the script in this article will be listed in GMT. This allows a uniform standard for large-scale networks that traverse multiple time zones.
Option Explicit
On Error Resume Next
' declare all variables
Dim objFSO,objFile
Dim objNet,objShell
Dim objProcess,objArgs
Dim strFolder,strFile
Dim blnFileExists
Dim objDateTime,lngTimeZoneOffset
Dim strYear,strMonth,strDay
Dim strLongDate,strShortDate
Dim strShortTime,strMethod
Dim strComputerName,strUserDomain,strUserName
' create all objects
Set objNet = WScript.CreateObject("WScript.Network")
Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
Set objShell = WScript.CreateObject("WScript.Shell")
Set objProcess = objShell.Environment("PROCESS")
Set objArgs = WScript.Arguments
' process arguments
If objArgs.Count <> 1 Then WScript.Quit
strMethod = UCase(objArgs(0))
' perform date operations
lngTimeZoneOffset = GetTimeZoneOffset()
objDateTime = Now() - lngTimeZoneOffset
strYear = CStr(Year(objDateTime))
strMonth = Right("00" & CStr(Month(objDateTime)),2)
strDay = Right("00" & CStr(Day(objDateTime)),2)
strLongDate = strYear & "-" & strMonth & "-" & strDay
strShortDate = Right(strYear,2) & strMonth & strDay
strShortTime = FormatDateTime(objDateTime,4) & ":" & Right("00" & CStr(Second(objDateTime)),2)
' get network information
strComputerName = objNet.ComputerName
If Len(strComputerName) = 0 Then strComputerName = "LOCALHOST"
strUserDomain = objNet.UserDomain
If Len(strUserDomain) = 0 Then strUserDomain = "LOCALHOST"
strUserName = objNet.UserName
If Len(strUserName) = 0 Then strUserName = "()"
' get windows directory name
strFolder = objProcess("WINDIR")
' check for and create "System32" folder
strFolder = strFolder & "\System32"
If objFSO.FolderExists(strFolder) = False Then
objFSO.CreateFolder(strFolder)
End If
' check for and create "LogFiles" folder
strFolder = strFolder & "\LogFiles"
If objFSO.FolderExists(strFolder) = False Then
objFSO.CreateFolder(strFolder)
End If
' check for and create "ACTIVITY" folder
strFolder = strFolder & "\ACTIVITY"
If objFSO.FolderExists(strFolder) = False Then
objFSO.CreateFolder(strFolder)
End If
' set up log file name
strFile = "ex" & strShortDate & ".log"
' check if log file exists
blnFileExists = objFSO.FileExists(strFolder & "\" & strFile)
' open or create the log file
Set objFile = objFSO.OpenTextFile(strFolder & "\" & strFile,8,True)
' write headers if new file
If blnFileExists = False Then
objFile.WriteLine "#Description: Log file for all LOGON/LOGOFF activity"
objFile.WriteLine "#Date: " & strLongDate & " " & strShortTime
objFile.WriteLine "#Fields: date time s-computername cs-username cs-method"
End If
' write the log data
objFile.WriteLine strYear & "-" & strMonth & "-" & strDay & " " & _
strShortTime & " " & _
strComputerName & " " & _
strUserDomain & "\" & _
strUserName & " " & _
strMethod
' close the log file
objFile.Close
Function GetTimeZoneOffset()
On Error Resume Next
Dim tmpShell,tmpOffset
Set tmpShell = WScript.CreateObject("WScript.Shell")
tmpOffset = objShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias")
If Len(tmpOffset) = 0 Then
tmpOffset = objShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\Bias")
End If
' set a default offset if none can be determined
If Len(tmpOffset) = 0 Then tmpOffset = "0"
' calculate offset in hours
tmpOffset = (CLng(tmpOffset) * -1) / 60
' calculate offset in 1/24 of a day
tmpOffset = tmpOffset / 24
GetTimeZoneOffset = tmpOffset
End Function
To use the sample script with the Default Domain Policy Group Policy Object (GPO), you first need to determine the Globally Unique Identifier (GUID) for the GPO. To do so, use the following steps:
To use the sample script with the GPO, you will need to copy the activity.vbs script on your desktop to each of the following paths:
%SystemRoot%\SYSVOL\sysvol\<DOMAIN>\Policies\<GUID>\USER\Scripts\Logon %SystemRoot%\SYSVOL\sysvol\<DOMAIN>\Policies\<GUID>\USER\Scripts\Logoff %SystemRoot%\SYSVOL\sysvol\<DOMAIN>\Policies\<GUID>\MACHINE\Scripts\Startup %SystemRoot%\SYSVOL\sysvol\<DOMAIN>\Policies\<GUID>\MACHINE\Scripts\Shutdown
Where <DOMAIN> is the Fully Qualified Domain Name (FQDN) of your domain, (e.g. mydomain.local ), and <GUID> is the Globally Unique Identifier (GUID) for the Default Domain Policy GPO.
If the Logon Script does not run, you may need to check your network connection speed as the script may not run when you first log on to the network. For additional information on this issue, click the article numbers below to view the articles in the Microsoft Knowledge Base:
302104 The Logon Script Does Not Run During the Initial Logon Process
For more information on the extended log file format, see the specification in the W3C Working Draft at the following URL:
http://www.w3.org/TR/WD-logfile
For additional information on assigning Logon/Logoff Scripts, click the article number below to view the article in the Microsoft Knowledge Base:
322241 HOW TO: Assign Scripts in Windows 2000
For additional information on the Extended Log File Format, click the article numbers below to view the articles in the Microsoft Knowledge Base:
194699 Extended Log File Format Always in GMT
271196 IIS Log File Entries Have the Incorrect Date and Time Stamp
242898 IIS Log File Naming Syntax