Java And UTF-8

When running a java application,
make sure to use -Dfile.encoding=UTF8,
for an 8-bit Unicode-support.

Interaction with standard input/output
requires setting the output’s code-page too.

For Windows run: chcp 65001 before you execute java.

For Unix/Linux: export LC_ALL="en_US.UTF-8".

Here is an example of a Windows batch-file named apktool.cmd,
that wraps around a jar-program named apktool.jar:

@echo off
chcp 65001 2>nul >nul
call java.exe "-d64 -Xverify:none -Duser.language=en -Dfile.encoding=UTF8" -jar "%~dp0\apktool.jar" %*

and here is why it is important to specify the output’s encoding:

Reader classes are now covered, for Writer classes make sure to explicit use UTF-8.
prefer using OutputStreamWriter (instead of FileWriter which does not support explicit charset):

BufferedWriter out = new BufferedWriter(
                       new OutputStreamWriter(
                         new FileOutputStream(path)

Some swear by explicit providing and additional reader/writer set,
so here is that too:

 OutputStreamWriter char_output = new OutputStreamWriter(
     new FileOutputStream("some_output.utf8"),

 InputStreamReader char_input = new InputStreamReader(
     new FileInputStream("some_input.utf8"),

which can be specified to handle input-error, which is sometime useful..

CharsetEncoder encoder = Charset.forName("UTF-8").newEncoder();
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("jedis.txt"),encoder));

Everything here is considered quite-safe to use,
since 8-bit Unicode (UTF-8) will still allow a fallback to displaying
characters out-of US-ASCII (for example) without the need for adding an
extra BOM bits, unlike UTF-16…


WTF Is “Bulk Texture File Conversion” Shell-Menu-Item

The Convert to file format... context-menu item
and Bulk Texture File Conversion dialog,
are a shell-contextmenu item, added after registering TxView.dll which is a part of DirectX SDK package.

You’ll have the menu-item when you’ll right-click on the a Directory, jpegfile, Paint.Picture, pfmfile, pngfile and TxView.1 file-types classes,

Continue reading

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

Aria2C Batch File For Quick Download

Copy to following CMD batch-file content into a new file,
and name it aria2download.cmd.

Place the file in the same folder as your aria2c.exe,
make sure it is your system-PATH,

and you can now enter aria2download "http..your-url..."
for a quick file-download to the current folder you are in.

All the important-switches are already set, such as maximum split value, and maximum connections per-server for ultra-fast download and an extra permissive-SSL to allow you to download from secure-servers without certificate verifying and a browser-like useragent and referrer value to generate a compatible download session with servers that often will block download-managers. You can easily personalise the batch-file to include an additional headers, authentications, etc…

Continue reading

Make Chrome Faster

1. Use Chrome/Chromium Of x64bit, if your machine can handle it.

2. Install those both official Chrome-extensions:

3. Access chrome://flags/ and change the following values,
you may easily reach either of those by copy&&paste them into the address-bar.

👉 chrome://flags/#num-raster-threads ➧4
👉 chrome://flags/#default-tile-width ➧1024
👉 chrome://flags/#default-tile-height ➧1024

👉 chrome://flags/#enable-fast-unload ➧Enable
👉 chrome://flags/#smooth-scrolling ➧Disable
👉 chrome://flags/#enable-quic ➧Enable
👉 chrome://flags/#enable-zero-copy ➧Enable
👉 chrome://flags/#enable-site-per-process ➧Enable
👉 chrome://flags/#v8-cache-options ➧’Cache V8 parser data.’
👉 chrome://flags/#v8-cache-strategies-for-cache-storage
👉 chrome://flags/#enable-scroll-anchoring ➧Disable
👉 chrome://flags/#enable-pointer-events ➧Enable
👉 chrome://flags/#passive-listener-default ➧’Force All True’
👉 chrome://flags/#document-passive-event-listeners ➧Enable
👉 chrome://flags/#passive-event-listeners-due-to-fling ➧Enable
👉 chrome://flags/#expensive-background-timer-throttling ➧Enable
👉 chrome://flags/#enable-nostate-prefetch ➧’Enabled Prerender’
👉 chrome://flags/#enable-resource-prefetch ➧’Enable Prefetching’
👉 chrome://flags/#delay-navigation ➧Disable

4. Just before the restart required in stage [3] (above),
close all other tabs (other than chrome://flags/),
access chrome://net-internals/#dns in a new-tab, and click the ‘clear host cache’, you can safely close the chrome://net-internals/#dns now, and back in the chrome://flags/ click on the big-blue ‘relaunch now’ button.

5. Run Chrome with the following command-line switches:

--enable-accelerated-vpx-decode="0x03" --prefetch-search-results --disable-pinch --disable-in-process-stack-traces --enable-tcp-fastopen --enable-threaded-compositing --enable-gpu-scheduler --use-double-buffering --enable-hardware-overlays --enable-partial-raster --disable-speech-api --ipc-connection-timeout="90"  --enable-gpu-memory-buffer-compositor-resources --enable-gpu-memory-buffer-video-frames --enable-native-gpu-memory-buffers --disable-payment-request --disable-3d-apis --disable-logging --disable-presentation-api --enable-rgba-4444-textures --v8-cache-options="data" --v8-cache-strategies-for-cache-storage="aggressive"

you may use a .bat or .cmd batch file if it is easier for you,
or use my project.
here is my ini file (for chromium :])


Arguments=--force-device-scale-factor="1.2" --enable-accelerated-vpx-decode="0x03" --allow-outdated-plugins --ppapi-flash-path="C:\Windows\System32\Macromed\Flash\PEPFLA~1.DLL" --ppapi-flash-version="" --prefetch-search-results --enable-lcd-text --enable-font-antialiasing=1 --ppapi-antialiased-text-enabled=1 --no-referrers --reduced-referrer-granularity --force-ui-direction=ltr --enable-pepper-testing --keep-alive-for-test --disable-pinch --ipc-connection-timeout="90" --disable-hang-monitor --disable-in-process-stack-traces --enable-tcp-fastopen --enable-threaded-compositing --enable-grouped-history --ash-md=enabled --material-design-ink-drop-animation-speed="fast" --show-md-login --top-chrome-md="material" --secondary-ui-md="material" --enable-gpu-scheduler --show-md-login --disable-md-oobe --use-double-buffering --desktop-window-1080p --enable-hardware-overlays --enable-partial-raster --disable-speech-api --enable-gpu-memory-buffer-compositor-resources --enable-gpu-memory-buffer-video-frames --enable-native-gpu-memory-buffers --disable-payment-request --disable-3d-apis --disable-logging --disable-presentation-api --enable-rgba-4444-textures --v8-cache-options="data" --v8-cache-strategies-for-cache-storage="aggressive" --enable-threaded-compositing --no-referrers

;;// Overrides the timeout, in seconds, that a child process waits for a
;;// connection from the browser before killing itself.
;;const char kIPCConnectionTimeout[]          = "ipc-connection-timeout";



search this blog for newer ways to download all recent command-line switches and this might also help: :]


Adding ‘Noto Mono’, ‘Courier New’, ‘Droid Sans Mono’, ‘Roboto Mono’, ‘Ubuntu Mono’ To Windows’ CMD

Just make sure you have those (you can google-search them or look for them at, the ‘Courier New’ font-face should be already installed in your Windows).

feel free to edit/replace/add more,
make sure the fonts are mono-type, use ‘000…00’ as name.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont]
"000"="Noto Mono"
"0000"="Courier New"
"00000"="Droid Sans Mono"
"000000"="Roboto Mono"
"0000000"="Ubuntu Mono"

If you don’t know of name of the font (it should be exactly right!),
open any program that does some sort of font selection, and allows copy&paste, such as Microsoft-Word or even Notepad2/Notepad++.

Notepad2 has a “default font” selection, which I’m not going to actually change, but just use it to browse-for font-names.

the standard control-panel, used by most (simple) does also allow easy copy&paste.

Stuff You Should Exclude From Your Anti-Virus

It should be perfectly safe to exclude some folders from your anti-virus processing.
Have a look below, my notes/comments should help you understand the generic state-of mind and then you can apply the same reasoning to modify or add other items.

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


CMD Snippet – Selective Executing From Either Windows System32 Or SysWOW64 Folders With Easy And Simple GOTO-State-Machine

A Bit Overkill of verifying what version of EXE to use (x32/x64), with error handling.
I use `ie4uinit.exe -ClearIconCache || ie4uinit.exe -show` as an example for an execute that exist in both-folders.
This is just a dictionary code, you can make it more efficient by storing the files and paths using `SET`, and even skip the x32 check or put the x32 path in a variable and optinally overwrite it, then executing the file blindly.
P.s just f.y.i. – executing `ie4uinit` from either x32 or x64 does not really makes a difference (this is just an example..)

The %WINDIR%\SysWOW64\NUL is a small trick to see if the path is a folder.

@echo off
:: A Bit Overkill of verifying what version of EXE to use (x32/x64), with error handling.
:: I use `ie4uinit.exe -ClearIconCache || ie4uinit.exe -show` as an example for an execute that exist in both-folders.
:: This is just a dictionary code, you can make it more efficient by storing the files and paths using `SET`, and even skip the x32 check or put the x32 path in a variable and optinally overwrite it, then executing the file blindly.
:: P.s just f.y.i. - executing `ie4uinit` from either x32 or x64 does not really makes a difference (this is just an example..)

if exist %WINDIR%\SysWOW64\NUL (
  if exist %WINDIR%\SysWOW64\ie4uinit.exe (
    goto X64;
  goto ERR;
if exist %WINDIR%\System32\NUL (
  if exist %WINDIR%\System32\ie4uinit.exe (
    goto X32;
  goto ERR;

goto EXIT
::--------------------------------------------------- this part will be-reached only by directly passing through `GOTO`-directive.
%WINDIR%\SysWOW64\ie4uinit.exe -ClearIconCache
goto EXIT

%WINDIR%\System32\ie4uinit.exe -ClearIconCache
goto EXIT

echo ERROR.
goto EXIT


Available also here:

Windows7/8/10+ Icon Files Handle Fixer

– This REG file will fix .ico, .cur and .ani files.
– It will fix your “native-handle”, allowing you, once again to see the content of the icon-files as mini-thumbnail (as usual).

Useful in-case you’ve accidently selected the “Open By Default With This Program…” check-box,
while opening one icon-file types above with another external program, and thus loosing the preview- showing by default in Windows (and instead, you now see the icon of the image editor you’ve last-opened the icon with..

Just copy&paste it into a .reg file, then double-click to apply it to your registry.

Continue reading

NodeJS Nightly

NodeJS x86, version 8 Nightly (latest)
– Including the latest docs
– Including the complete source-code – required for IntelliJ (under lib folder)
– Including latest node.lib (Visual-Studio integration)
– Including latest node.pdb (Microsoft Program DataBase, debugging information)

– Super compressed 290MB – to 36MB.

Download (many mirrors)

Password: 1



7Zip v15.8 x64bit.

– No installation needed.
– You should be able to uncompress its content from the ZIP- natively with Windows.
– Also, a RAR archive.
Continue reading


Hiren's BootCD‘s menu.lst includes the following part:

title Mini Windows Xp\nRun Antivirus and other windows programs
# example password: test 
# password --md5 $1$gNe0$KZPOE8wNbTNSKOzrajuoB0
find --set-root /HBCD/XP/XP.BIN
#map --mem /HBCD/XP/f6drivers.img (fd0)&&map --hook
chainloader /HBCD/XP/XP.BIN

The f6drivers.img line is marked out (the file does not actually exist),

You may download the x86 drivers from: #1 or #2, WinImage and just place the content in a new .IMA file, next- rename the extension from .IMA to .IMG.

Download a ready to use .IMG files:
Continue reading

Reverse Engineer – WD External Storage Driver Setup (x64/x86)

  • The WD External Storage Driver suitable for the entire line of myPassport USB Hard-Drives.
  • This article allows you to download both the original Windows Installer MSI file, and its content, (drivers only) and install them yourself.
    You may also embed the drivers to prepare a Windows setup through slipstream (just an idea).
  • The drivers are not modified in any way, and are digitally signed by WD certificate, so you may install them with no particular issue.
    Since it’s signed, there is No need to run those two commands:

    • bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS
    • bcdedit.exe -set TESTSIGNING ON

Driver’s version

  • from INF: 1.0.0009.0
  • from files: (actual)

Driver’s created

  • INF reports: Jan 19th 2011
  • from files: February 16th 2011 (actual)

WD SES Driver Setup (x86).msi [678KB]

Drivers only.
WD SES Drivers Only (x86).zip [17KB]

Extract anywhere, installed by right click, install.
Or run C:\System32\InfDefaultInstall.exe "wdcsam.inf".

Driver’s version: 1.0.0009.0, Actual version (from files)
Driver Created: Jan 19th 2011, Actual date (from files) February 16th 2011

WD SES Driver Setup (x64).msi [1.03MB]

Drivers only.
WD SES Drivers Only (x64).zip [17KB]

Extract anywhere, installed by right click, install.
Or run C:\System32\InfDefaultInstall.exe "wdcsam.inf".

Continue reading

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 :]]

Chromium API Keys

When you build Chromium yourself, or download a Chromium nightly-build, you need to provide API-key, a secret-phrase and a client-id,
running Chromium without either of those three phrases will seriously compromise Chromium’s functionality.

The is a sort of “inner-Google” page on how to generate, and use the API-Keys needed to make Chromium a properly, fully functional Chrome-compatible browser (including Syncing your bookmarks and other stuff..)

There is an issue, however, with that page ( which has not been-updated for a while, especially on the names of the API-services, one, needs to enable in-order to use Chromium in a fully functional mode,


I’ve gathered those services (including a direct link for you to use in-order to activate it)
the following list (Google API-console) is ordered as:

– Name.
– Description.
– URL.

the list of API-services is sorted (A,B,C..) by the Name of the API-service.

Continue reading

Enlarge CCleaner’s Font-Size

This is a walk-through, that will help you to change (- enlarge) the default font-size of the (wonderful) CCleaner program,
so it will look nice on large-screens, although this can be done globally by setting the operation-system’s DPI settings to something like 120%,
the following explanation is better, if you’ll will to modify, just, CCleaner – and not your entire system :)

This is kind of a lite reverse-engineering. Don’t be scared – YOU CAN DO IT! + EASILY!

I’ve modified the default font-size (8pt) to a much larger/clear 14pt. You may choose a different value.

The original:

The modified:

The modified, using Hebrew as default language, it works well- without any additional modifications (affects all languages).

Continue reading