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 3.0.0.0) 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.

Ps.
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.

http://www.sno.phy.queensu.ca/~phil/exiftool/
https://en.wikipedia.org/wiki/ExifTool
https://sourceforge.net/projects/exiftool/
https://downloads.sourceforge.net/project/exiftool/exiftool-10.48.zip?r=&ts=1491744058&use_mirror=netix

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

remove_metadata.cmd:

@echo off
:LOOP
::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;
)
::OK
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%"


:NEXT
shift
goto LOOP

:END
pause

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…

So..

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

icompile.eladkarako.com_thinapp_thinstall_virtual_registry_tvr_convert_to_reg_key1

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:

icompile.eladkarako.com_thinapp_thinstall_virtual_registry_tvr_convert_to_reg_key2_batch_look

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.
    icompile.eladkarako.com_thinapp_thinstall_virtual_registry_tvr_convert_to_reg_key_folder1
  2. Under reg_convert create two folder named in and out
    icompile.eladkarako.com_thinapp_thinstall_virtual_registry_tvr_convert_to_reg_key_folder2
  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 :]

    [Compression]
    CompressionType=None
    
    [Isolation]
    DirectoryIsolationMode=Merged
    
    [BuildOptions]
    ;-------- Parameters used only during Setup Capture  ----------
    AccessDeniedMsg=You are not currently authorized to run this application. Please contact your administrator.
    CapturedUsingVersion=5.1.0-2079447
    CaptureProcessorArchitecture=0
    CapturePlatformVersion=0501
    CaptureOSArchitecture=32
    CaptureOSMajorVersion=5
    CaptureOSMinorVersion=1
    CaptureOSSuite=256
    CaptureOSProductType=1
    CaptureOSCSDVersion=Service Pack 3
    CaptureOSProcessorCoreCount=2
    CaptureOSRemoteSession=0
    CaptureOSVMwareVM=1
    OutDir=bin
    
    AnsiCodePage=1255
    LocaleIdentifier=1033
    
    AltArchitectureShortcut=0
    QualityReportingEnabled=0
    

    icompile.eladkarako.com_thinapp_thinstall_virtual_registry_tvr_convert_to_reg_key_folder3

  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..)
    icompile.eladkarako.com_thinapp_thinstall_virtual_registry_tvr_convert_to_reg_key_can_make_registry_txt_files_smaller

  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\,
      icompile.eladkarako.com_thinapp_thinstall_virtual_registry_tvr_convert_to_reg_key_generate_tvr_of_just_registry_values2
      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.
      icompile.eladkarako.com_thinapp_thinstall_virtual_registry_tvr_convert_to_reg_key_generate_tvr_result
      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
        icompile.eladkarako.com_thinapp_thinstall_virtual_registry_tvr_convert_to_reg_key_generate_final_registry_key_result
        You’ll find your result file under the out folder as well as the old tvr file.
        icompile.eladkarako.com_thinapp_thinstall_virtual_registry_tvr_convert_to_reg_key_generate_final_registry_key_result_in_folder

      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 "https://storage.googleapis.com/chromium-browser-continuous/Win_x64/362418/mini_installer.exe" 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
endlocal

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 igvita.com 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

[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\root@172.29.40.112]
"Present"=dword:00000001
"HostName"="172.29.40.112"
"LogFileName"="D:\\LOGS\\log_host&H_y&Ym&Md&D_t&T.txt"
"LogType"=dword:00000001
"LogFileClash"=dword:00000000
"LogFlush"=dword:00000001
"SSHLogOmitPasswords"=dword:00000001
"SSHLogOmitData"=dword:00000000
"Protocol"="ssh"
"PortNumber"=dword:00000016
"CloseOnExit"=dword:00000001
"WarnOnClose"=dword:00000001
"PingInterval"=dword:00000000
"PingIntervalSecs"=dword:00000000
"TCPNoDelay"=dword:00000001
"TCPKeepalives"=dword:00000001
"TerminalType"="xterm"
"TerminalSpeed"="38400,38400"
"TerminalModes"="CS7=A,CS8=A,DISCARD=A,DSUSP=A,ECHO=A,ECHOCTL=A,ECHOE=A,ECHOK=A,ECHOKE=A,ECHONL=A,EOF=A,EOL=A,EOL2=A,ERASE=A,FLUSH=A,ICANON=A,ICRNL=A,IEXTEN=A,IGNCR=A,IGNPAR=A,IMAXBEL=A,INLCR=A,INPCK=A,INTR=A,ISIG=A,ISTRIP=A,IUCLC=A,IXANY=A,IXOFF=A,IXON=A,KILL=A,LNEXT=A,NOFLSH=A,OCRNL=A,OLCUC=A,ONLCR=A,ONLRET=A,ONOCR=A,OPOST=A,PARENB=A,PARMRK=A,PARODD=A,PENDIN=A,QUIT=A,REPRINT=A,START=A,STATUS=A,STOP=A,SUSP=A,SWTCH=A,TOSTOP=A,WERASE=A,XCASE=A"
"AddressFamily"=dword:00000001
"ProxyExcludeList"=""
"ProxyDNS"=dword:00000001
"ProxyLocalhost"=dword:00000000
"ProxyMethod"=dword:00000000
"ProxyHost"="proxy"
"ProxyPort"=dword:00000050
"ProxyUsername"=""
"ProxyPassword"=""
"ProxyTelnetCommand"="connect %host %port\\n"
"Environment"=""
"UserName"="root"
"UserNameFromEnvironment"=dword:00000000
"LocalUserName"="root"
"NoPTY"=dword:00000000
"Compression"=dword:00000000
"TryAgent"=dword:00000001
"AgentFwd"=dword:00000000
"GssapiFwd"=dword:00000000
"ChangeUsername"=dword:00000000
"Cipher"="aes,blowfish,3des,WARN,arcfour,des"
"KEX"="dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN"
"RekeyTime"=dword:0000003c
"RekeyBytes"="1G"
"SshNoAuth"=dword:00000000
"SshBanner"=dword:00000001
"AuthTIS"=dword:00000000
"AuthKI"=dword:00000001
"AuthGSSAPI"=dword:00000001
"GSSLibs"="gssapi32,sspi,custom"
"GSSCustom"=""
"SshNoShell"=dword:00000000
"SshProt"=dword:00000002
"LogHost"=""
"SSH2DES"=dword:00000000
"PublicKeyFile"=""
"RemoteCommand"=""
"RFCEnviron"=dword:00000000
"PassiveTelnet"=dword:00000000
"BackspaceIsDelete"=dword:00000001
"RXVTHomeEnd"=dword:00000000
"LinuxFunctionKeys"=dword:00000000
"NoApplicationKeys"=dword:00000000
"NoApplicationCursors"=dword:00000000
"NoMouseReporting"=dword:00000000
"NoRemoteResize"=dword:00000000
"NoAltScreen"=dword:00000000
"NoRemoteWinTitle"=dword:00000000
"RemoteQTitleAction"=dword:00000001
"NoDBackspace"=dword:00000000
"NoRemoteCharset"=dword:00000000
"ApplicationCursorKeys"=dword:00000000
"ApplicationKeypad"=dword:00000000
"NetHackKeypad"=dword:00000000
"Tray"=dword:00000001
"StartTray"=dword:00000000
"TrayRestore"=dword:00000001
"WakeupReconnect"=dword:00000001
"FailureReconnect"=dword:00000001
"AltF4"=dword:00000001
"AltSpace"=dword:00000000
"AltOnly"=dword:00000000
"ComposeKey"=dword:00000000
"CtrlAltKeys"=dword:00000001
"TelnetKey"=dword:00000000
"TelnetRet"=dword:00000001
"LocalEcho"=dword:00000002
"LocalEdit"=dword:00000002
"Answerback"="PuTTY"
"AlwaysOnTop"=dword:00000000
"FullScreenOnAltEnter"=dword:00000000
"HideMousePtr"=dword:00000000
"SunkenEdge"=dword:00000000
"WindowBorder"=dword:00000001
"CurType"=dword:00000001
"BlinkCur"=dword:00000001
"Beep"=dword:00000001
"BeepInd"=dword:00000000
"BellWaveFile"=""
"BellOverload"=dword:00000001
"BellOverloadN"=dword:00000005
"BellOverloadT"=dword:000007d0
"BellOverloadS"=dword:00001388
"ScrollbackLines"=dword:0098967f
"DECOriginMode"=dword:00000000
"AutoWrapMode"=dword:00000001
"LFImpliesCR"=dword:00000000
"CRImpliesLF"=dword:00000000
"DisableArabicShaping"=dword:00000000
"DisableBidi"=dword:00000000
"WinNameAlways"=dword:00000001
"WinTitle"="172.29.40.112 - PuTTY"
"TermWidth"=dword:00000064
"TermHeight"=dword:0000001a
"Font"="Courier New"
"FontIsBold"=dword:00000000
"FontCharSet"=dword:000000b1
"FontHeight"=dword:00000010
"FontQuality"=dword:00000001
"FontVTMode"=dword:00000004
"UseSystemColours"=dword:00000000
"TryPalette"=dword:00000000
"ANSIColour"=dword:00000001
"Xterm256Colour"=dword:00000001
"BoldAsColour"=dword:00000001
"Colour0"="255,255,255"
"Colour1"="255,255,255"
"Colour2"="51,51,51"
"Colour3"="85,85,85"
"Colour4"="0,0,0"
"Colour5"="0,255,0"
"Colour6"="77,77,77"
"Colour7"="85,85,85"
"Colour8"="255,43,43"
"Colour9"="255,85,85"
"Colour10"="152,251,152"
"Colour11"="85,255,85"
"Colour12"="240,230,140"
"Colour13"="255,255,85"
"Colour14"="205,133,63"
"Colour15"="135,206,235"
"Colour16"="255,222,173"
"Colour17"="255,85,255"
"Colour18"="255,160,160"
"Colour19"="255,215,0"
"Colour20"="245,222,179"
"Colour21"="255,255,255"
"RawCNP"=dword:00000000
"PasteRTF"=dword:00000001
"MouseIsXterm"=dword:00000002
"RectSelect"=dword:00000000
"MouseOverride"=dword:00000001
"Wordness0"="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
"Wordness32"="0,1,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1"
"Wordness64"="1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,2"
"Wordness96"="1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1"
"Wordness128"="1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"
"Wordness160"="1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"
"Wordness192"="2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2"
"Wordness224"="2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2"
"LineCodePage"="UTF-8"
"CJKAmbigWide"=dword:00000000
"UTF8Override"=dword:00000001
"Printer"=""
"CapsLockCyr"=dword:00000000
"ScrollBar"=dword:00000001
"ScrollBarFullScreen"=dword:00000001
"ScrollOnKey"=dword:00000001
"ScrollOnDisp"=dword:00000001
"EraseToScrollback"=dword:00000001
"LockSize"=dword:00000000
"BCE"=dword:00000001
"BlinkText"=dword:00000000
"X11Forward"=dword:00000000
"X11Display"=""
"X11AuthType"=dword:00000001
"X11AuthFile"=""
"LocalPortAcceptAll"=dword:00000000
"RemotePortAcceptAll"=dword:00000000
"PortForwardings"=""
"BugIgnore1"=dword:00000000
"BugPlainPW1"=dword:00000000
"BugRSA1"=dword:00000000
"BugIgnore2"=dword:00000000
"BugHMAC2"=dword:00000000
"BugDeriveKey2"=dword:00000000
"BugRSAPad2"=dword:00000000
"BugPKSessID2"=dword:00000000
"BugRekey2"=dword:00000000
"BugMaxPkt2"=dword:00000000
"BugWinadj"=dword:00000000
"StampUtmp"=dword:00000001
"LoginShell"=dword:00000001
"ScrollbarOnLeft"=dword:00000000
"BoldFont"=""
"BoldFontIsBold"=dword:00000000
"BoldFontCharSet"=dword:00000000
"BoldFontHeight"=dword:00000000
"WideFont"=""
"WideFontIsBold"=dword:00000000
"WideFontCharSet"=dword:00000000
"WideFontHeight"=dword:00000000
"WideBoldFont"=""
"WideBoldFontIsBold"=dword:00000000
"WideBoldFontCharSet"=dword:00000000
"WideBoldFontHeight"=dword:00000000
"ShadowBold"=dword:00000000
"ShadowBoldOffset"=dword:00000001
"SerialLine"="COM1"
"SerialSpeed"=dword:00002580
"SerialDataBits"=dword:00000008
"SerialStopHalfbits"=dword:00000002
"SerialParity"=dword:00000000
"SerialFlowControl"=dword:00000001
"WindowClass"=""

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@172.29.40.112 -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=http://closure-linter.googlecode.com/files/closure_linter-latest.tar.gz
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%

::extract
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
)

pause

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).

latest_linter_with_wget_and_tar.rar

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=http://listen.di.fm/public3/ambient.pls              ^
         http://listen.di.fm/public3/breaks.pls               ^
         http://listen.di.fm/public3/chillout.pls             ^
         http://listen.di.fm/public3/chilloutdreams.pls       ^
         http://listen.di.fm/public3/chiptunes.pls            ^
         http://listen.di.fm/public3/classiceurodance.pls     ^
         http://listen.di.fm/public3/classictechno.pls        ^
         http://listen.di.fm/public3/classictrance.pls        ^
         http://listen.di.fm/public3/classicvocaltrance.pls   ^
         http://listen.di.fm/public3/club.pls                 ^
         http://listen.di.fm/public3/clubdubstep.pls          ^
         http://listen.di.fm/public3/cosmicdowntempo.pls      ^
         http://listen.di.fm/public3/deephouse.pls            ^
         http://listen.di.fm/public3/deepnudisco.pls          ^
         http://listen.di.fm/public3/discohouse.pls           ^
         http://listen.di.fm/public3/drumandbass.pls          ^
         http://listen.di.fm/public3/dubstep.pls              ^
         http://listen.di.fm/public3/electro.pls              ^
         http://listen.di.fm/public3/epictrance.pls           ^
         http://listen.di.fm/public3/eurodance.pls            ^
         http://listen.di.fm/public3/funkyhouse.pls           ^
         http://listen.di.fm/public3/futuresynthpop.pls       ^
         http://listen.di.fm/public3/goapsy.pls               ^
         http://listen.di.fm/public3/handsup.pls              ^
         http://listen.di.fm/public3/hardcore.pls             ^
         http://listen.di.fm/public3/harddance.pls            ^
         http://listen.di.fm/public3/hardstyle.pls            ^
         http://listen.di.fm/public3/house.pls                ^
         http://listen.di.fm/public3/latinhouse.pls           ^
         http://listen.di.fm/public3/liquiddnb.pls            ^
         http://listen.di.fm/public3/lounge.pls               ^
         http://listen.di.fm/public3/minimal.pls              ^
         http://listen.di.fm/public3/oldschoolacid.pls        ^
         http://listen.di.fm/public3/progressive.pls          ^
         http://listen.di.fm/public3/progressivepsy.pls       ^
         http://listen.di.fm/public3/psychill.pls             ^
         http://listen.di.fm/public3/soulfulhouse.pls         ^
         http://listen.di.fm/public3/spacemusic.pls           ^
         http://listen.di.fm/public3/techhouse.pls            ^
         http://listen.di.fm/public3/techno.pls               ^
         http://listen.di.fm/public3/trance.pls               ^
         http://listen.di.fm/public3/tribalhouse.pls          ^
         http://listen.di.fm/public3/ukgarage.pls             ^
         http://listen.di.fm/public3/vocalchillout.pls        ^
         http://listen.di.fm/public3/vocaltrance.pls          ^
         http://somafm.com/480min.pls                         ^
         http://somafm.com/beatblender.pls                    ^
         http://somafm.com/bootliquor.pls                     ^
         http://somafm.com/brfm.mp3                           ^
         http://somafm.com/cliqhop.pls                        ^
         http://somafm.com/covers.pls                         ^
         http://somafm.com/digitalis.pls                      ^
         http://somafm.com/dronezone.pls                      ^
         http://somafm.com/dubstep.pls                        ^
         http://somafm.com/groovesalad.pls                    ^
         http://somafm.com/illstreet.pls                      ^
         http://somafm.com/indiepop.pls                       ^
         http://somafm.com/lush.pls                           ^
         http://somafm.com/missioncontrol.pls                 ^
         http://somafm.com/poptron.pls                        ^
         http://somafm.com/sf1033.pls                         ^
         http://somafm.com/sonicuniverse.pls                  ^
         http://somafm.com/spacestation.pls                   ^
         http://somafm.com/suburbsofgoa.pls                   ^
         http://somafm.com/sxfm.pls                           ^
         http://somafm.com/tags.pls                           ^
         http://somafm.com/u80s.pls                           ^
         http://www.di.fm/mp3/djmixes.pls                     ^
         http://www.fresh.fm/media/audio/ListenHigh.pls       ^
         http://www.sky.fm/mp3/altrock.pls                    ^
         http://www.sky.fm/mp3/beatles.pls                    ^
         http://www.sky.fm/mp3/bossanova.pls                  ^
         http://www.sky.fm/mp3/christian.pls                  ^
         http://www.sky.fm/mp3/classical.pls                  ^
         http://www.sky.fm/mp3/classicrap.pls                 ^
         http://www.sky.fm/mp3/classicrock.pls                ^
         http://www.sky.fm/mp3/country.pls                    ^
         http://www.sky.fm/mp3/datempolounge.pls              ^
         http://www.sky.fm/mp3/guitar.pls                     ^
         http://www.sky.fm/mp3/hit70s.pls                     ^
         http://www.sky.fm/mp3/indierock.pls                  ^
         http://www.sky.fm/mp3/jazz.pls                       ^
         http://www.sky.fm/mp3/lovemusic.pls                  ^
         http://www.sky.fm/mp3/newage.pls                     ^
         http://www.sky.fm/mp3/oldies.pls                     ^
         http://www.sky.fm/mp3/pianojazz.pls                  ^
         http://www.sky.fm/mp3/rootsreggae.pls                ^
         http://www.sky.fm/mp3/salsa.pls                      ^
         http://www.sky.fm/mp3/smoothjazz.pls                 ^
         http://www.sky.fm/mp3/solopiano.pls                  ^
         http://www.sky.fm/mp3/soundtracks.pls                ^
         http://www.sky.fm/mp3/the80s.pls                     ^
         http://www.sky.fm/mp3/tophits.pls                    ^
         http://www.sky.fm/mp3/uptemposmoothjazz.pls          ^
         http://www.sky.fm/mp3/urbanjamz.pls                  ^
         http://www.sky.fm/mp3/world.pls                      ^
         http://www.sky.fm/wma/altrock.asx                    ^
         http://www.sky.fm/wma/classicrock.asx                ^
         http://www.sky.fm/wma/indierock.asx                  ^
         http://www.sky.fm/wma/salsa.asx                      ^
         http://www.somafm.com/secretagent.pls

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

exit

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.

1.
get latest revision number from this url: http://commondatastorage.googleapis.com/chromium-browser-continuous/Win/LAST_CHANGE

2.
concat it to this url, to get into the FTP of this (meaning the latest) revision
http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/put 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
::  http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html
::  http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/
::  http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/
::  https://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/
::  https://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/144914/
::  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_Base=commondatastorage.googleapis.com/chromium-browser-continuous/Win
set sUrl_FileName=mini_installer.exe



setlocal enableextensions
    :: sVersionNumber init.
    set sVersionNumber=""
    set sUrl_Version=http://commondatastorage.googleapis.com/chromium-browser-continuous/Win/LAST_CHANGE
    for /f "tokens=*" %%a in ('.\res\getRemoteFileTextContent.exe %sUrl_Version%') do (set sVersionNumber=%%a)
    
    ::dynamic information init.
    set sReferrer="http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/%sVersionNumber%/"
    set sCookie="http://o-o.preferred.fra07t11.v8.cache8.c.bigcache.googleapis.com/chromium-browser-continuous/Win/%sVersionNumber%/mini_installer.exe?ms=tsu&mt=1340990464&cms_redirect=yes&redirect_counter=2"

    ::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"                      ^

endlocal

pause

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:
getRemoteFileTextContent.rar

p.s.

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=http://src.chromium.org/svn/trunk/src/chrome/common/chrome_switches.cc
set sURL2=http://src.chromium.org/svn/trunk/src/base/base_switches.cc
set sUserAgent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTBDFff GTB7.0 (.NET CLR 3.5.30729)"

set sFile=switches.cc

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
::  http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html
::  http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/
::  http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/
::  https://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/
::  https://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/144914/
::  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_Base=commondatastorage.googleapis.com/chromium-browser-continuous/Win
set sUrl_FileName=mini_installer.exe
set sOrbitDownloaderExeFullPath=C:\Program Files (x86)\Orbitdownloader\orbitdm.exe


setlocal enableextensions
    :: sVersionNumber init.
    set sVersionNumber=""
    set sUrl_Version=http://commondatastorage.googleapis.com/chromium-browser-continuous/Win/LAST_CHANGE
    for /f "tokens=*" %%a in ('.\res\getRemoteFileTextContent.exe %sUrl_Version%') do (set sVersionNumber=%%a)
    
    ::dynamic information init.
    set sReferrer="http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Win/%sVersionNumber%/"
    set sCookie="http://o-o.preferred.fra07t11.v8.cache8.c.bigcache.googleapis.com/chromium-browser-continuous/Win/%sVersionNumber%/mini_installer.exe?ms=tsu&mt=1340990464&cms_redirect=yes&redirect_counter=2"

    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"                      ^
         "%sURL%"
    
    ::option #2.
    ::-------------------------------------------
    ::call "%sOrbitDownloaderExeFullPath%" "%sURL%"
    
endlocal

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:1.9.1.6) Gecko/20091201 Firefox/3.5.6"
wget --directory-prefix=. --user-agent=%sUserAgent% %sURL%
endlocal
pause

4. put the (1),