The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for the ‘Windows XP’ Category

Windows: killing the Zone.Identifier NTFS alternate data stream from a file to prevent security warning popup

Posted by jpluimers on 2011/11/25

The Zone.Identifier NTFS alternate data stream (ADS) is appended to Internet downloads by browsers, and inserted by most decompressors when expanding such downloads.

NTFS alternate data streams are a perfect way to hide data, support Mac OS data forks (which used them to support resource fork meta data tagging long before NTFS alternate data streams were introduced), or to append meta-data to files.

It is a known ADS used to show a security warning when you run executable content that has been downloaded.
That warning can be annoying, or hang your application which it is started from a service, so further below is a batch file that kills the stream.

You cannot use type for displaying NTFS alternate data streams, but redirection through more or using notepad is fine.

This shows the Zone.Identifier NTFS alternate data stream for a single file:

more < %1:Zone.Identifier

When you want to see the ADS of many files, then just use NirSoft’s AlternateDateStreams utility.

You should only kill an Zone.Identifier NTFS alternate data stream when you have verified that the downloaded executable content (which nowadays is much more than just an executable) is verified to be safe.

An easy way to kill any NTFS alternate data stream is to copy it to a FAT32 device and back: FAT does not support alternate data streams. Drawback: it modifies the timestamp of your file as FAT has a smaller time resolution than NTFS has.

This batch file kills  the Zone.Identifier NTFS alternate data stream using the SysInternals streams tool:

@echo off
  if !%1!==!! goto :end
  :: use caret before pipe to hide the pipe from the outermost command in the batch file
  for /f "usebackq tokens=1" %%d in (`streams.exe %1 ^| find "Zone.Identifier:$DATA"`) do (
    goto :kill
  )
  goto :end
:kill
  streams -d %1
:end

and this batch file lists the Zone.Identifier NTFS alternate data streams:

@echo off
  if !%1!==!! goto :end
  :: use caret before pipe to hide the pipe from the outermost command in the batch file
  for /f "usebackq tokens=1" %%d in (`streams.exe %1 ^| find "Zone.Identifier:$DATA"`) do (
    goto :list
  )
  goto :end
:list
  streams.exe %1 | find ":"
:end

Note that the $DATA in the above batch files is not part of the NTFS alternate data stream name, but explains what kind of data is in the stream.
I have not found other types yet, but if you do, please leave a comment (preferably with a link).

–jeroen

Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 7, Windows Vista, Windows XP | 2 Comments »

Why can’t I move the Program Files directory via the unattend file? – via: The Old New Thing – Site Home – MSDN Blogs

Posted by jpluimers on 2011/10/07

You cannot move the C:\Program Files directory to another volume without installing Windows on that volume.

A small abstract from the explanation by Raymond Chen: The symbiotic relation between C:\Windows\WinSxS and C:\Program Files through NTFS hard links prevents you to move C:\Program Files (nor WinSxS) to a different disk volume. Both directories need to be on the same volume because of the NTFS hard link limitation.

NTFS hardlinks do save a ton of diskspace, even though WinSxS will keep growing over time, which means you need to do some careful disk volume planning, especially on SSD drives.

–jeroen

via: Why can’t I move the Program Files directory via the unattend file? – The Old New Thing – Site Home – MSDN Blogs.

Posted in Microsoft Surface on Windows 7, Power User, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »

C#/Windows: why LastWriteTime can be earlier than CreationTime

Posted by jpluimers on 2011/10/05

I was wondering about file times like these:

CreationTime....: 5-10-2011 10:00:13
LastAccessTime..: 5-10-2011 12:05:58
LastWriteTime...: 5-10-2011 10:00:10

I found the answer on stackoverflow.

If a file is copied to another file, the new file retains the LastWriteTime of the source but the CreationTime will be the time of the copy.

And indeed: the file had been copied from a local directory to a central network location.

–jeroen

via c# – Windows: How to determine if a file has been modified since a given date – Stack Overflow.

Posted in .NET, C#, Development, Power User, Software Development, Windows, Windows 7, Windows 8, Windows Vista, Windows XP | Leave a Comment »

Download: Microsoft Remote Desktop Connection Client for Mac 2.1.1 (via Microsoft Office for Mac Downloads and Updates | Office For Mac)

Posted by jpluimers on 2011/09/30

If you use Mac and Windows machines, then – despite the Mac keyboards – it sometimes is handy to use Mac to remote login to a Windows machine.

For that, the Microsoft Remote Desktop Connection Client for Mac 2.1.1 (especially the download <g>) comes in handy.

–jeroen

via: Microsoft Office for Mac Downloads and Updates | Office For Mac.

Posted in Apple, LifeHacker, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, Power User, Usability, Windows, Windows 7, Windows 8, Windows Vista, Windows XP | Leave a Comment »

Windows “Device Manager” – expand all nodes

Posted by jpluimers on 2011/09/23

 

Expanded Windows Device Manager

 

With the increasing number of devices, it really helps to expand all nodes in the Device Manager’s tree view.

You cannot do this with the mouse, as none of the menu options contain an “Expand All” option.

But since the treeview, is the built-in Windows treeview (used in many places, like Windows explorer), you can use these shortcuts to expand/collapse nodes:

  • Numeric Keypad *: Expands everything under the current selection
  • Numeric Keypad +: Expands the current selection
  • Numeric Keypad -: Collapses the current selection.
  • RIGHT ARROW: Expands the current selection if it is not expanded, otherwise goes to the first child
  • LEFT ARROW: Collapses the current selection if it is expanded, otherwise goes to the parent

This not only works in Microsoft Windows 7: Visual … – Google Books, I think it has been introduced as far back as Windows 95.

–jeroen

Posted in Keyboards and Keyboard Shortcuts, Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista, Windows XP | 1 Comment »

Comparison of PDF printer drivers

Posted by jpluimers on 2011/09/16

A long time ago I showed a list of PDF printer drivers.

In the mean time, FreewareGenius did a comparison of free PDF printer drivers in june 2011.

Time to go to the BullZip site and try the download of their Free PDF Printer :)

–jeroen

Posted in Power User, Windows, Windows 7, Windows Vista, Windows XP | Leave a Comment »

solution for: “Not enough server storage is available to process this command”: restart “Server” service and “Computer Browser”

Posted by jpluimers on 2011/09/12

Recently I got this error when copying a huge number of files from Windows XP x86 to Windows 7 x64

System error 1130 has occurred.

Not enough server storage is available to process this command.

Instead of changing the IRPStackSize as mentioned at
PChucks Network: Server Functionality Affected By IRPStackSize, I just restarted the “Server” service (and the depending “Computer Browser” service) on the Windows 7 system, and everything worked dandy.

–jeroen

Posted in Power User, Windows 7, Windows XP | Leave a Comment »

Synchronize your NTP time using pool.ntp.org: the internet cluster of ntp servers

Posted by jpluimers on 2011/07/15

If you use NTP for syncing your time, then choose pool.ntp.org as your time server:

The pool.ntp.org project is a big virtual cluster of timeservers providing reliable easy to use NTP service for millions of clients.

I use it for instance to synchronize the time on my ESXi servers.

Note: when you run Windows VMs as ESXi guests; let ESXi time-sync them through the VMware tools, and disable Windows’ own time syncing. I didn’t disable it, and my Windows VMs were consistently off by over 30 minutes.

–jeroen

via pool.ntp.org: the internet cluster of ntp servers.

Posted in *nix, ESXi4, Power User, VMware, Windows, Windows 7, Windows Vista, Windows XP | 4 Comments »

Recovering an NTFS partition: TestDisk Step By Step – CGSecurity

Posted by jpluimers on 2011/07/08

Recently I had the NTFS partition table of  a 2.5 inch USB disk fail because somehow I didn’t correctly attach the split-USB cable: the disk didn’t get enough power, and Windows decided it should overwrite the partition table.

The free TestDisk tool by GCSecurity came to the rescue: TestDisk Step By Step – CGSecurity.

–jeroen

Posted in Power User, Windows, Windows 7, Windows Vista, Windows XP | 1 Comment »

Microsoft Security Advisory: Microsoft Office File Validation for Office 2003, 2007 Office, and Office 2010: April 12, 2011

Posted by jpluimers on 2011/07/01

Unlike most updates marked as “Important Update”, this one requires a manual license agreement confirmation:

Microsoft Office File Validation Add-in

PLEASE NOTE:  Microsoft Corporation (or based on where you live, one of its affiliates) licenses this supplement to you.  You may use a copy of this supplement with each validly licensed copy of Microsoft 2003 & 2007 Office System Desktop Application software (the “software”).  You may not use the supplement if you do not have a license for the software.  The license terms for the software apply to your use of this supplement.  To read the license terms, go to the “Help” menu in the software.  Microsoft provides support services for the supplement as described at www.support.microsoft.com/common/international.aspx.

Though the security advisory was more than 2 months ago, it only got pushed to Microsoft update this week.

Good thing though that finally Microsoft is able to check the integrity of their document formats in Office 2007 and 2003: Microsoft Security Advisory: Microsoft Office File Validation for Office 2003, 2007 Office, and Office 2010: April 12, 2011.

–jeroen

Posted in Power User, Windows, Windows 7, Windows Vista, Windows XP | Leave a Comment »