Sunday, March 31, 2013

Check if installation file is damaged, command line

I came with idea to check file content condition by extracting content of file.
If the extraction was successful then file is ok.

Save 7z.exe and 7z.dll libraries.

This example test file filename.exe.
"%~dp07z.exe" x "%~dp0filename.exe" -o"%temp%" -y > nul 2>&1
if not !errorlevel!==0 echo file is corrupt
Extended version:
@echo off

setlocal EnableDelayedExpansion
set file=%~dp0test.exe
set extract_dir=%temp%\temp7z

"%~dp07z.exe" x "%file%" -o"%extract_dir%" -y
if not !errorlevel!==0 (
echo installation file is corrupt
) else echo installation file is ok

rd "%extract_dir%" /Q /S

The output will be similar to this:

Next one will check all .exe files in directory where this batch file is having a good time.
@echo off

setlocal EnableDelayedExpansion
set extract_dir=%temp%\temp7z

for /f "delims=" %%f in ('dir /b "%~dp0\*.exe"') DO (
"%~dp07z.exe" x "%~dp0\%%f" -o"%extract_dir%" -y > nul 2>&1
if not !errorlevel!==0 (
echo %%f is bad
) else echo %%f is ok

rd "%extract_dir%" /Q /S

Remove > nul 2>&1 if you want monitor what really is going on.

Saturday, March 30, 2013

How to install SARDU. Mhahahaha

With SARDU you can:
Boot HirensBootCD from USB
Boot a lot of copy2ram linux system
Install Windows XP from USB
and a little bit more ;)

The point is that now the original installation wizard has build like a joke :)

To install SARDU without additional stuff keep in mind these steps:
The [Cancel] button looks like inactive, but you can still press it.

Press skip at the top

The [Decline] looks like and inactive button, but you can still press it :)

Related files:

Friday, March 29, 2013

Integrate [disable splash screen] in adobe reader 11 src

Download these files:

The batch file disable-splash-screen-in-HKCU.cmd
reg add "HKCU\Software\Adobe\Adobe Acrobat\11.0\Originals" /v bDisplayAboutDialog /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Adobe\Acrobat Reader\11.0\Originals" /v bDisplayedSplash /t REG_DWORD /d 1 /f
Now you can install adobe reader with
msiexec /i AdbeRdr11000_en_US.msi transforms=disabled-splash-screen-adobe-reader-11.mst EULA_ACCEPT=YES /qb

Thursday, March 28, 2013

Text file encode, awk on windows

I use notepad++ to create sample input file.
I find out that the only way to satisfy awk is to use
Encode in UTF-8 without BOM

Wednesday, March 27, 2013

Massive proofing tools silent uninstall, Office 2013

This will uninstall all Office 2013 proofing tool packs.
You will need to download your installed proofing tools source installation files.
Save these source files in one folder.


Place 7z.exe and 7z.dll in directory where all your favorite proofing tools is having a good time.

For 32-bit proofing tool versions use
@echo off
for /F "delims=" %%f IN ('dir /b "%~dp0proofingtools*x86.exe"') DO (
"%~dp07z.exe" x "%~dp0%%f" -o"%temp%\_%%f" -y
msiexec /x "%temp%\_%%f\proof.msi" /qn
rd "%temp%\_%%f" /Q /S
For 64-bit proofing tool versions use
@echo off
for /F "delims=" %%f IN ('dir /b "%~dp0proofingtools*x64.exe"') DO (
"%~dp07z.exe" x "%~dp0%%f" -o"%temp%\_%%f" -y
msiexec /x "%temp%\_%%f\proof.msi" /qn
rd "%temp%\_%%f" /Q /S
That is it! :)

Flash Player detection rule, System Center 2012

I use adobe flash player exe installation instead of msi installation so now i can make a version control.

"%~dp0install_flash_player_ax.exe" -install
"%~dp0install_flash_player.exe" -install
"%~dp0install_flash_player_ax.exe" -uninstall
"%~dp0install_flash_player.exe" -uninstall

Detection method for Flash Player ActiveX

Detection method for none-ActiveX version Flash Player

Map these two rules. This is a little bit dirty and none-perfect - if one of version is old then re-install both.

Current adobe flash player versions - these links always stands for latest version:

Blog Archive