Wednesday 12 June 2013

"Path too long" when trying to delete folder - Robocopy to the rescue

One of the many long running mysteries of Windows, is why it's possible to create deep nested directories/files (>256 characters), but not be able to delete/navigate them.

Deep nested (long) directory path, most often manifest around the use of shared folders or the subst command and it can be a hassle to deal with.

There's a few tools around that are designed to target this exact problem, but hiding on everyone system* is a great little program called Robocopy that is primarily designed for copying files. However it can be used to delete them as well.

Here's how you can delete those path too long directories easily, using a single robocopy command.
  • Create an Empty directory
  • Open a command prompt (cmd.exe) - Elevate if necessary.
    • Open the Start menu and type "cmd".
    • Right click the shortcut and select "Run as administrator" 
  • At the command prompt type "robocopy /PURGE <path-to-empty-directory>  <path-to-long-directory>.
    Double check the paths, else risk deleting the wrong files/directory
  • Hit Enter to start the process.
* Robocopy comes standard with Vista and above operating systems. If you are running XP or older, then you can obtain Robocopy as a part of the  Windows Server 2003 Resource Kit Tools

Tuesday 28 May 2013

Prevent Java updates from installing sponsor apps and toolbars like Ask and McAfee

Updated for new sponsors: See option 3,4 & 5 for newer versions of Java that bundle Amazon assist.

If you are like me and sick of uninstalling foist-ware like IAC Ask toolbar or McAfee Antivirus scanner, then here's a little trick to prevent future Java updates re-installing that pesky sponsored/bundled software.

Previously the only option was install the offline edition of the Java installer.

Note: These registry settings also block other foist-ware, such as Google Toolbar / Chrome etc.

Option 1

Open Notepad and paste in the following text. Then save the file with a .reg extension. Exit Notepad and then double click the .reg file you just created. When prompted by the Registry Editor to Continue. Click "Yes".

Windows Registry Editor Version 5.00

Option 2

Press the [Windows Key] + R or select the start menu type and select the "run" shortcut. Then copy/paste the below lines into the "Run" window and select OK. Repeat the process for both lines.

reg ADD HKLM\SOFTWARE\Wow6432Node\JavaSoft /v SPONSORS /t REG_SZ /d DISABLE /f

Option 3

Edit the "C:\ProgramData\Oracle\Java\java.settings.cfg" file and add the line below.

Option 4

If a previous version is installed, Use the Configure Java GUI.

Option 5

Execute ssvagent.exe (with local admin rights) with the -disablesponsorofferings switch.
"C:\Program Files (x86)\Java\<version>\bin\ssvagent.exe" -disablesponsorofferings

Saturday 12 January 2013

Ricoh Card Reader drivers

Looking for the Ricoh card reader drivers? So was I. After a long winded search to locate these drivers, I thought post these here. These drivers are for Windows XP contains
  • RMedia.inf ( 12/18/2002,
  • RMedia.sys

Ricoh RL5C476 CardBus Controller
Ricoh MediaCard Controller
Ricoh MediaCard DriverInstDisk

Ricoh MediaCard Controller
Ricoh SmartMedia Controller
Ricoh Memorystick Controller
Ricoh SD/MMC Controller

Driver supports the following hardware ID's