Manually Removing Fonts From Windows, And Refreshing The Windows Font-Cache Storage File

*Close/save any opened documents and programs since this process will require a restart at some point,
plus programs/documents may attach hooks, locking the font-folder and its content.

First, stop the services FontCache3.0.0.0 (Windows Presentation Foundation Font Cache and FontCache (Windows Font Cache Service), and set the their startup-type to “disabled” (just for those few moments…)

Stopping those services, will allow you an easier access to the C:\Windows\Fonts folder,
without those processes constantly accessing the fonts-folder.

next use task-manager to stop explorer.exe processes, which will unhook most of the hooks set to the C:\Windows\Fonts folder (including the files inside it..)

Use unlocker to unlock any of the remaining hooks,
and any way of browsing for files such as FAR-commander or even Locate32, to help you delete any of the font files you want.

It is best to make a backup-copy of the entire folder, including all of the files inside,
just in-case.

Use CCleaner to automatically clean-up any registry-entries for the deleted-font files,

We’re almost done, and now it is time to delete the static-cache files for the font-folder,
so new ones will be created for the new folder-content.

Remove (or rename their extensions to .old) both FNTCACHE.DAT and StaticCache.dat which you’ll find under C:\Windows\System32\ and C:\Windows\SysWOW64\.

*Generating the new cache-files will be done automatically the next time the cache-services will start-up,
but we’ll let them start automatically after the next PC-restart.

Before restarting your PC,
switch the startup-type of both FontCache3.0.0.0 and FontCache to “automatic”,
without actually restarting them by yourself.

Quickly press [WINDOWS]+[R], to open-up the “run” dialog-box,
type restart -f -r -t 00 and press [ENTER].

The next time the computer will be up,
after you’ll log-into your account, the new cache-files will be created.

You may even want to refresh the icon-cache for your desktop icons and such,
by running the following command: ie4uinit.exe -ClearIconCache (you’ll have to wait few moments for it to finish). No need to restart afterwards.

The entire process takes few moments but it will speed up your Windows-PC,
especially if you’ll end-up deleting a lot of unneeded font-files.

Here is a way of doing the same process, automatically,
and much faster…

Continue reading

ExifTool – Ultimate Batch To Remove All Tags, From Infinite List Of Files, With Verbose Status And Progress Report

ExifTool is a free and open-source software program for reading, writing, and manipulating image, audio, video, and PDF metadata. It is platform independent, available as both a Perl library (Image::ExifTool) and command-line application. ExifTool is commonly incorporated into different types of digital workflows and supports many types of metadata including Exif, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP and ID3, as well as the manufacturer-specific metadata formats of many digital cameras.

The following example is a batch for Windows operation-system, but it can be easily migrated to any other supported OS, to use it, just mark a bunch of files (any amount! it does not limited to usual batch-queue-limit of 9) and drag&drop them over the batch-file.

Plus it will work on any file, naturally file-types that are not supported by the ExifTool will be ignored (skipped), so feel free to just use [CTRL]+[A] to select all the files without pin-point-select just the ones you need.. or unsure if they will be supported, if it will, it will.. and if it won’t, it won’t.. :]


@echo off
::has argument ?
if ["%~1"]==[""] (
  echo done.
  goto END;
::argument exist ?
if not exist %~s1 (
  echo not exist
  goto NEXT;
::file exist ?
echo exist
if exist %~s1\NUL (
  echo is a directory
  goto NEXT;
echo is a file

set FILE_INPUT="%~s1"
set FILE_OUTPUT="%~d1%~p1%~n1_fixed%~x1"

call exiftool -progress -verbose -ignoreMinorErrors -XMPToolkit="" -all="" -trailer:all="" "%FILE_INPUT%"

goto LOOP


Solved: ThinApp Registry Export

Say you want to convert VMWare’s ThinApp (formerly known as Thinstall) Registry,
From the sanbox-virtual format (those text files in your capture/project-name folder) To something a human can be easily read, say, a windows registry file.

Why? well.. maybe you’ve just captured a setup process in-order to check what has been changed on your operation-system.

A really common reason to use ThinApp without actually building anything at the end, at least among the VM-savvy engineers is for the sake of tracking the changes to the operation-system, in hope of simplifying installations, in cases all you may need is a pair of exe-and-reg files and no need for an overkill of sandboxing an entire application + virtualapp-engine.
ThinApp does a very good job of capturing even the deepest registry changes (including those of permission limitation or ones which does not “really exist”, such as soft symbolic-linked keys for example under HKEY_USERS (which are common enough).

Another way of comparing registry changes including dumping the entire registry (before and after..) and comparing the the .REG files using a program such as BeyondCompare.

A similar method but somehow slightly easier is the usage of Registry-Workshop, and the “before” and “after” snapshots feature, following the built-in compare-engine which is pretty much a nice wrap around the same thing (above) except using the program’s internal-compare engine which also allows to jump-into the inspected values, sync changes, etc…


I’ve captured a nice little freeware called foxit PDF
and got the familiar folder structure (before building anything!)


If you’ll have a look (just a look, don’t worry..)
inside the build.bat batch-file,
You’ll see part of the command we’ll going to use, which is actually part of creating the virtual-sandbox,
in-particularity- the REGISTRY part:


After the hint, it is time for the solution walk-through:

  1. Under your ThinApp folder (same level where you’ll find the Setup Capture.exe file create a new folder, named reg_convert.
  2. Under reg_convert create two folder named in and out
  3. Under in folder, copy the Package.ini from your captured-package,
    or use this generic, minimal Package.ini

    you only need the part related to setup-capture, mostly the versioning of the capturing engine of ThinApp, and the code-page [language] of 1033 [English] might be useful in-case you have registry keys with foreign-characters, which in this case you might want to have a look at the values of one of your original captured Package.ini files, or Google it.. 1037 is Hebrew :]

    ;-------- Parameters used only during Setup Capture  ----------
    AccessDeniedMsg=You are not currently authorized to run this application. Please contact your administrator.
    CaptureOSCSDVersion=Service Pack 3


  4. Still under the in folder, you should now copy (just) the registry files (.TXT) from your captured project.

    You do not have to copy them all, and you are well encouraged to make them as small and lite as possible by removing values that are not needed. The smaller and fewer they’ll be, the faster the entire process will be completed.

    For example I’ll going to remove the following “keys/values/data” since they are not needed or even related to the package itself, even more than that, those can collide with the operation-system’s more recent-values (in-case I’ll be building the project later..)

  5. At this point, we will generate a virtual-sandbox holding just the registry values (no files), using the vregtool.exe command.

    1. open up CMD and navigate to where you have your vregtool.exe
      (same place you’ll have reg_convert).
      cd c:\.......\ThinApp\
    2. run vregtool.exe reg_convert\out\reg.tvr ImportDir reg_convert\in\,
      You may ignore warnings, or remove any extra-empty lines at the bottom of the txt files,
      It will take few seconds, and you’ll find the tvr file under the out folder.
      1. Almost done, we will, now, extract the actual registry key (in the standard windows format) from the virtual-sandbox, exporting it to the same out folder.

        run:vregtool.exe reg_convert\out\reg.tvr ExportReg reg_convert\out\registry.reg
        You’ll find your result file under the out folder as well as the old tvr file.

      2. Done.

        naturally a cleanup will be required in-order to use the same method of converting txttvrreg,
        remove the txt files under in folder, keep Package.ini file there to be used the next time.
        you can safely remove the entire content of the out folder (the reg.tvr, and once you’ll be done with it- the registry.reg file).

        Naturally a batch file can quite easily be generated,
        You can make one to drag&drop the entire captured-folder, allowing automated copy, generating the copying back the result to your captured-project, in same place as the txt files, to keep things organised by project. :)

      Hope it helps ! :]

      Happy engineering day :]]

CMD/Bash Script Ninja – cURL Response Header Number Manipulation

Use cURL response headers using either --head or --include (to include the headers with the response-body),

For the following example we will use GREP, SED (gnu can be compiled either Win32 or Linux, heck! even use cygwin in Windows [as long you put the c:\cygwin\bin\ in PATH, it is super easy])
and Content-Length response-header,

– no “on screen” output (perfect for in-scripts)
– no temporary-file saving (R/O I/O are considered bad practice.. and slow..)
– working out PIPE action (suitable for both Windows and Linux)
– processing and simple arithmetics on value (no just a “stupid” string..)

@echo off

setlocal enableextensions
  for /f "tokens=*" %%a in ('curl --head --ipv4 --sslv3 --silent --location-trusted --url "" 2^>^&1 ^| grep "Content-Length" 2^>^&1 ^| sed "s/\r\n$//g" 2^>^&1 ^| sed "s/content-length\:\ //gi" 2^>^&1') do ( set /a num=%%a )
  set /a num=%num% / 1024 / 1024
  echo it is %num%MB

will output

it is 41MB

(original header was Content-Length: 43597312)

(naturally a pure bash variable output is simpler.. but interior of pipe processing is still -kind’a- similar, and thus- useful or at least quite interesting..)

Hope it will be useful I’ve saw no StackOverflow nor any Google-related resources providing anything similar to that..

PUTTY Theme And Logs

There are few tweaks that make PUTTY (raw PUTTY, no other software nor plugins) nicer,
the Desert-Theme from is one of them, other may be logging and unlimited scroll backward, right click menu and username pasted automatically, merged into one REG file,

just copy&&paste it to an empty text file and change its extension to *.reg,
then double click and you’ll have a new line for a demo,
load it and change the IP, and username to something that will be useful to you.

Windows Registry Editor Version 5.00

"ProxyTelnetCommand"="connect %host %port\\n"
"WinTitle"=" - PuTTY"
"Font"="Courier New"

create an empty folder in your D: drive named “LOGS”,
and every session will be logged into that folder.

create a windows shortcut link, like so:

"D:\Software\putty\PUTTY.EXE" -load root@ -pw thePasswordText

to get directly into the session without the need to enter the password.

FFMPEG Video Crop

Use FFMPEG’s stream copy combined with the basic crop-by-time command

ffmpeg -threads 4 -ss 00:06:12 -t 00:01:20 -i inVideo.mp4 -vcodec copy -acodec copy outVideo.mp4

starting the 6th minute, and 12 seconds into the video (this is the start point for the cut), measure length of 1 minute and 20 seconds, and, using 4 threads, without re-encoding audio nor video stream, put data into new out file.

-threads 4

is optional, but recommended.

Latest Google-Closure-JSLinter (GJSLint) – Download and Extract

set sUserAgent="Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1456.0 Safari/537.36"
set sURL=
set sDownloadfile=closure_linter-latest.tar.gz

::rename existing to old_*
if exist %sDownloadfile% (
    ren %sDownloadfile% old_%sDownloadfile% >nul

::download new version
.\_res\wget.exe --continue --server-response --directory-prefix=. --user-agent=%sUserAgent% %sURL%

if exist %sDownloadfile% (
    ::extract archive  -- x=eXtract, z=filter through gZip, v=be Verbose(show activity), f=filename.
   .\_res\tar xzvf %sDownloadfile%

   ::remove archive file
   del /f /q %sDownloadfile% >nul


You can download the entire script with resources (wget to download and tar to extract the “closure_linter-latest.tar.gz” file into a folder (plain easy tar xzvf closure_linter-latest.tar.gz where x=eXtract, z=filter through gZip, v=be Verbose(show activity), f=filename).


Windows CMD Multi Process Example

break a long, sequential task, into multi-process higher CPU-usage, quick solution.

example – download a long list of playlist very quick.

you are going to have 2 cmd files in the same folder.
make sure you have wget (either in the same folder or in your %path% environment variable).

file name: playlist__start_all.cmd
file content:

::@echo off
echo I am the runner

set sURL=              ^               ^             ^       ^            ^     ^        ^        ^   ^                 ^          ^      ^            ^          ^           ^          ^              ^              ^           ^            ^           ^       ^               ^              ^             ^            ^            ^                ^           ^            ^               ^              ^        ^          ^       ^             ^         ^           ^            ^               ^               ^          ^             ^        ^          ^                         ^                    ^                     ^                           ^                        ^                         ^                      ^                      ^                        ^                    ^                      ^                       ^                           ^                 ^                        ^                         ^                  ^                   ^                   ^                           ^                           ^                           ^                     ^       ^                    ^                    ^                  ^                  ^                  ^                 ^                ^                    ^              ^                     ^                     ^                  ^                       ^                  ^                     ^                     ^                  ^                ^                      ^                 ^                  ^                ^                     ^                    ^          ^                  ^                      ^                    ^                ^                  ^                      ^

:: init stage.
:: remove old files
    attrib -H .\*.pls                              >nul
    attrib -H .\*.asx                              >nul

    if exist .\*.pls  del /f /q .\*.pls            >nul
    if exist .\*.asx  del /f /q .\*.asx            >nul

for %%e in (%sURL%) do (
    ::parallel diffrent process. and continue.
    start /min /low "cmd /c "call playlist__file_downloader.cmd %%e""

file name: playlist__file_downloader.cmd
file content:

@echo off

set sUserAgent="Mozilla/5.0 (Windows NT 5.2; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1"

wget --directory-prefix=. --debug --user-agent=%sUserAgent% %1

:: file name fix
if exist "dubstep.pls.1"   ren "dubstep.pls.1"   "dubstep2.pls"   >nul
if exist "the80s.pls"      ren "the80s.pls"      "80s.pls"        >nul
if exist "hit70s.pls"      ren "hit70s.pls"      "70s.pls"        >nul
if exist "mpg128.pls"      ren "mpg128.pls"      "woxy.pls"       >nul
if exist "ListenHigh.pls"  ren "ListenHigh.pls"  "freshfm.pls"    >nul

:: set file-attribute hidden.
:::::: attrib +H .\*.pls
:::::: attrib +H .\*.asx


now you execute “playlist__start_all.cmd” and the long list of files will be break (space separated)
and for each file there will be a secondary batch execution of “playlist__file_downloader.cmd” with the file name as argument.

Chromium Installer – Download Latest Nightly-Build Snapshot

figured it out.

get latest revision number from this url:

concat it to this url, to get into the FTP of this (meaning the latest) revision revision number here/

I’ve made a small VB6 program that uses Win32 API to download the latest revision number and send it to the STDOUT,
and a CMD (batch file) that reads it and use wGet to download the execute.

wget has custom settings like using reffer url, cookie, user-agent, avoiding cache, re-write the mime-type, longer keep-alive, tring few times, downloading backup in case of an error- can re download from the same point,
all like the execute was downloaded from a browser.

::  browse
::  for more information.

@echo off
::static information init.
set sUserAgent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)"
set sUrl_Protocol=https
set sUrl_FileName=mini_installer.exe

setlocal enableextensions
    :: sVersionNumber init.
    set sVersionNumber=""
    set sUrl_Version=
    for /f "tokens=*" %%a in ('.\res\getRemoteFileTextContent.exe %sUrl_Version%') do (set sVersionNumber=%%a)
    ::dynamic information init.
    set sReferrer=""
    set sCookie=""

    ::download execute
    wget "%sUrl_Protocol%://%sUrl_Base%/%sVersionNumber%/%sUrl_FileName%"                                                   ^
                                                                            --no-check-certificate                          ^
                                                                            --wait=2                                        ^
                                                                            --referer=%sReferrer%                           ^
                                                                            --timestamping                                  ^
                                                                            --debug                                         ^
                                                                            --continue                                      ^
                                                                            --no-cache                                      ^
                                                                            --no-cookies                                    ^
                                                                            --no-dns-cache                                  ^
                                                                            --server-response                               ^
                                                                            --auth-no-challenge                             ^
                                                                            --directory-prefix=.                            ^
                                                                            --header="Accept: application/octet-stream"     ^
                                                                            --header="Accept: application/x-msdos-program"  ^
                                                                            --header="Keep-Alive: 300"                      ^



to use the script you’ll need the small Execute or any other way of downloading and reading the content of the latest revision number (you can use “curl” compiled for windows, or something…)

and wGet (compiled for win32) placed in the same folder as the script or in the PATH.
download it here:


you can have all the new command-line switches for the newest latest version of chromium put in a text file and viewed by notepad++.
use the following CMD (batch) script:

@echo off
rem   set command-line arguments.
set sURL1=
set sURL2=
set sUserAgent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100401 Firefox/3.6.3 GTBDFff GTB7.0 (.NET CLR 3.5.30729)"


rem   remove old files.
if exist %sFile%   del /f /q %sFile%   >nul

rem   download.
wget --directory-prefix=. --user-agent=%sUserAgent% --output-document=%sFile% %sURL1% %sURL2%
rem ren %sFile% %sFile%_

start "D:\Software\Notepad++\Notepad++.exe" "%CD%\%sFile%"

you will need to modify the full url to Notepad++, or put its path in your PATH variable and just use “Notepad++.exe”, you will also need a wget compiled for win32 platform (or x64) just google it.

March 2014: here is a working update:
it uses wGet, but you can also throw the link into any parallel download manager to speed things up a little, it uses a session cookie to fool the web-server a little bit..

::  browse
::  for more information.

::static information init.
set sUserAgent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)"
set sUrl_Protocol=https
set sUrl_FileName=mini_installer.exe
set sOrbitDownloaderExeFullPath=C:\Program Files (x86)\Orbitdownloader\orbitdm.exe

setlocal enableextensions
    :: sVersionNumber init.
    set sVersionNumber=""
    set sUrl_Version=
    for /f "tokens=*" %%a in ('.\res\getRemoteFileTextContent.exe %sUrl_Version%') do (set sVersionNumber=%%a)
    ::dynamic information init.
    set sReferrer=""
    set sCookie=""

    set sURL=%sUrl_Protocol%://%sUrl_Base%/%sVersionNumber%/%sUrl_FileName%

    ::option #1.
    wget --no-check-certificate                          ^
         --wait=2                                        ^
         --referer=%sReferrer%                           ^
         --timestamping                                  ^
         --debug                                         ^
         --continue                                      ^
         --no-cache                                      ^
         --no-cookies                                    ^
         --no-dns-cache                                  ^
         --server-response                               ^
         --auth-no-challenge                             ^
         --directory-prefix=.                            ^
         --header="Accept: application/octet-stream"     ^
         --header="Accept: application/x-msdos-program"  ^
         --header="Keep-Alive: 300"                      ^
    ::option #2.
    ::call "%sOrbitDownloaderExeFullPath%" "%sURL%"

Deflate Folder Tree

This is a CMD (BATCH) script to flat a folder tree,
all files will be moved to the root.

for /r %%e in (*.*) do move "%%e" .\

working recursively, a user interaction would be needed when ever two files with the same name exist in the root, also you might wanna use attrib to remove all hidden and system attributes because CMD does not behave well with does on.

proper way to make it work: put the script into a bank cmd (or bat) file,
put it in the root folder and run it, you can modify it to work without user interaction.

Chromium Browser – The Future Of Google Chrome

Chromium is the code-name for Google Chrome development project, the nightly-builds are available for download, and are, mostly, fully functional.

home page for the project.
new builds are available to download here.

I’ve made download script, and a small vb6 program to find the latest version, to make it work you would need those 3 things:
1. wGet.
2. this program: Latest Chromium URL.
3. the following script into a blank CMD (or BAT) file:

@echo off
if exist mini_installer.exe del /f /q mini_installer.exe
setlocal enableextensions
for /f "tokens=*" %%a in ('.\LatestChromiumURL.exe') do (set sURL=%%a)
set sUserAgent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20091201 Firefox/3.5.6"
wget --directory-prefix=. --user-agent=%sUserAgent% %sURL%

4. put the (1),