Blog: Windows 7

Libraries in Windows 7 and Server 2008 by default contain the Public Documents and My Documents location. I was working with a user who’s documents were set with a group policy. This user had an odd configuration, in that his documents were in a different location than the other users. After moving his documents to a new location, they still showed up in his Documents library. I decided to remove the old documents folder that points to the old network location. After removing the old documents folder and correcting the group policy that was applying the settings, his Music/Pictures/Movies were all pointed to the new location, but his Documents only showed the Public documents. [more]

After much searching, I decided to click “Restore Defaults”. This immediately fixed the problem.

The GotCha is that the My Documents Library is a single location for the files, no matter where the folder is pointed. When I hid the old documents location, it remained hidden until I restored the folder to defaults.


 

Often we are required to install programs or run applications under users logins that have restrictions in place. Many times right clicking and selecting “Run as administrator”, allows the application to run or prompts for credentials.  Other times the application tries to run and fails without prompting for credentials and the solution is to login as an administrator and run it. If you hold the “Shift” key and right click the application or install file, another option will appear “Run as a different user”. By selecting “Run as a different user” you are immediately prompted and can input the administrator credentials before the application even tries to run. This eliminates the need to logoff the users account and logon as an administrator.

 

By default Windows Explorer just searches file names and contents.  You can specify any field that can be displayed and follow it with a colon and what you want to search for.  For example name:, datetaken:, author:.  Boolean constructs like AND, OR, and NOT and be used.  There are several functions such as ~<, which means begins with.  If the options you want are not there, Windows may have guessed that the folder contains certain types of items.  You can change this by going to the properties on the folder, and on the Customize tab, change the “Optimize this folder for” dropdown.  There are other options under Organize, Folder and search options, on the Search tab.
 
Search help for "Advanced tips for searching in Windows" for more information.

 

I was working in the Command Processor to fix a BitLocker problem. I needed to enter a couple of commands which were posted in the CoNetrix blog. To be sure I didn’t make any typing mistakes, I copied the first command into Notepad where I verified the input and then copied and pasted into the Command Processor. Doing that I got an error, the command wouldn’t work. I retried several times, none were successful. Eventually I resorted to typing the command directly into the Command Processor and, surprise, surprise, it worked.

For the second command I committed the same error (not always a fast learner). I got errors when pasting the command and success when I typed the command directly. [more]

Since this happened to me twice I began to research the problem with pasting info into the Command Processor and discovered it was a problem with two different characters entered for the dash (-) character. While one character was entered by pasting, a different character was entered when manually typing. In testing I discovered this is true both in Notepad and the Command Processor. (If I retyped the dash in Notepad before copying and pasting into the Command Processor, the command worked.) The problem comes because there is no visible difference in the characters, both look the same in Notepad and Windows processor, but behind the scenes, in the code for the characters, there is a difference. While I haven’t researched this beyond the dash characters, I would imagine there could also be problems with other special characters as well.

The gotcha is not to assume characters are the same just because they appear the same.


 

Simple erasure of a disk (or thumb drive). Windows 7 “full” format will overwrite each byte on the disk with zeroes.  This began with the Vista o/s and is true also with Windows 7.  This can cause problems for virtual machines running on a SAN.  Here is the statement from Microsoft KB 941961: [more]
 
The format command behavior has changed in Windows Vista. By default in Windows Vista, the format command writes zeros to the whole disk when a full format is performed. In Windows XP and in earlier versions of the Windows operating system, the format command does not write zeros to the whole disk when a full format is performed.

The new format behavior may cause problems for the on-demand allocation modes that a volume storage provider, such as a Storage Area Network (SAN), supports. Problems may occur because the new format behavior prematurely triggers allocation of the backing space.

In the on-demand scenario, zeros do not have to be written to the whole disk because the volume storage provider initializes the on-demand-allocated data. To avoid causing unnecessary on-demand-allocation, you must use the quick format option.


 

Typically, we run memory diagnostics from a bootable CD, but if you are trying to troubleshoot a computer in another city this is not always possible. Windows 7, Vista, Server 2008, and Server 2008 R2 have a built in utility called mdsched.exe. The utility can be started from a Windows session and will start automatically at the next reboot. The default is a simple memory diagnostic, but extended testing can be performed. Results will display during the test, on screen after the test, and in the Event Viewer under Applications and Services > Microsoft > Windows > MemoryDiagnostics-Results > Memory Diagnostic Tool  after the test is complete.
More detailed information can be found here: [more]

http://www.sevenforums.com/tutorials/715-memory-diagnostics-tool.html


 

Robocopy that ships with Windows 7/2008 seems to have a bug. If you specify /MT (for multiple threads), it forces /E (copy empty directories).  This causes it to run much more slowly.  Even if all the destination directories have already been created, it still accesses each one.  If copying over a relatively slow connection,  it can be very slow if you use /MT. [more]

Some discussion is here: https://social.technet.microsoft.com/Forums/en-US/w7itprogeneral/thread/155d47ea-2523-4343-80dc-f0a987971b62


 

Windows has a command line tool fsutil which performs file system related tasks.  You must be an administrator on the local machine to use it.  There are a couple of commands that could speed up disk access.

By default, every time a file is accessed, even read, the last access date is updated.  This can be disabled.

fsutil behavior query DisableLastAccess
fsutil behavior set   DisableLastAccess 1

Every file created with a “long” file name, an 8.3 name is created and stored.  This can be disabled. [more]

fsutil 8dot3name query
fsutil 8dot3name scan /s c:
(check log file for registry entries for applications that might break)
fsutil 8dot3name set c: 1

Help text is available by just entering fsutil.  More complete documentation at http://technet.microsoft.com/en-us/library/cc753059(v=ws.10).


 

I recently ran into some problems where the Adobe Reader process (Acrord32.exe) was using the maximum available CPU resources constantly. Even after Adobe reader program is closed, the process remains running in the background continuing to use all of the available CPU resources. Through research I found that the issue has been reported on Windows XP, Windows 7, Windows 2003 (TS and Citrix), Windows 2008 R2 (TS and Citrix). The issue only seemrf to occur when version 10.1.3 was installed as a new installation and not upgraded from a previous version (according to some people’s notes).

The Adobe Reader default install allows "Adobe to display in-product marketing messages while you work in the program". When you launch Reader. the "open recent documents" window that shows during launch includes ReaderMessages along the bottom of the window or may be displayed as you view PDFs. These message are downloaded from Adobe and probably stored in the ReaderMessages file stored within each user’s APPDATA portion of the profile. I'm guessing there is corrupt content in one of Adobe recent messages causing Reader to stay in memory or use high CPU once the application is closed. [more]

To stop the issue, disable the Messages from Adobe by modifying the following settings.

  1. Select Edit - Preferences – General
  2. Uncheck “Show me messages when I launch Reader”
  3. Check “Don’t show messages while viewing a document”
  4. Close Reader (and manually kill process if necessary) and reopen 

Note that the following settings are ‘per user’ and must be set by each individual user. To address the issue on a global level, consider doing the following:

  • Modify the Reader 10 customization transform file to include the necessary registry keys to disable the settings (would require a reinstall of the application)
  • Modify the Default user profile to include the necessary registry keys to disable the settings (would only affect new users logging into the server, current users profiles would have to be removed for the settings to take place)
  • Import the registry values using group policy or a login script; if using windows 2008 R2 servers, group policy preferences will import the registry settings very easily

Here are the registry key values that need to be set:

  • HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\10.0\IPM]
    • DWORD "bShowMsgAtLaunch" to 0
    • DWORD "bDontShowMsgWhenViewingDoc" to 1

 

In Windows XP there was the advanced file type options which could be changed to open each Excel file in a new instance of Excel. In Windows 7 that advanced option is not available. So, when mulple Excel spreadsheets are opened in Office 2007/2010 on a Windows 7 system, all will open in the same instance. A solution is available, but it involves making lile changes in the registry. I recommend making back up for just in case.  Then follow these steps: [more]

  1. start -> run -> regedit
  2. Go to  HKEY_CLASSES_ ROOT/ Excel.Sheet.8/ shell/Open/command
  3. Double Click on (Default) and write "C:\Program Files\Microso Office\Office12 \EXCEL.EXE" /e "% 1" for Office 2007 or "C:\Program Files\Microso Office\Office14 \EXCEL.EXE" /e "% 1" for Office 2010.
  4. Right Click on Command, choose "rename", and add something to the name (for example 2 (command2))  
  5. Go to HKEY_CLASSES_ROOT/Excel.Sheet.8/ shell/Open/ ddeexec
  6. Right Click on the folder ddeexec, choose "rename", and add something to the name (for example 2 (ddeexec2))
  7. Go to HKEY_CLASSES_RO OT/Excel.Sheet.12/ shell/Open/command 
  8. Double Click on (Default) and write "C:\Program Files\Microso Office\Office12 \EXCEL.EXE" /e "% 1" for Office 2007 or  "C:\Program Files\Microso Office\Office14 \EXCEL.EXE" /e "% 1" for Office 2010. 
  9. Right Click on Command, choose "rename", and add something to the name  (for example 2 (command2)). 

No restart is needed. Excel will now open a new instance for each file opened. I have found that opening mulple .csv files will stay in the same instance, but all .xslx files will open in their own instance.