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

endlocal
pause
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

endlocal
pause
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:
http://googledrive.com/host/0B71V5FepYzikVHl5elktOHkxY1U/SARDU_2.0.6.5.zip
https://dl.dropbox.com/u/93473439/SARDU_2.0.6.5.zip
2ed35c00b13f8c9881a8ace4d0562dcf
7274708fbec3e739945b7b6910f7512e7fa00770

Friday, March 29, 2013

Integrate [disable splash screen] in adobe reader 11 src

Download these files:
http://ardownload.adobe.com/pub/adobe/reader/win/11.x/11.0.00/en_US/AdbeRdr11000_en_US.msi
4eb9eaf5326d61ef4de30b353e878551
8cc8a0dbb57ad3efbbb930f945287fb63247a20a
http://ardownload.adobe.com/pub/adobe/acrobat/win/11.x/11.0.03/misc/CustWiz11003_en_US.exe
e4aa57872b03b6f03b54a3c74bd91fd4
24e565fa5944cc8b01024fc63eeb87fc0741b627

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.

Save
http://gnu.catonrug.net/7z.exe
http://gnu.catonrug.net/7z.dll

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.

install.flash.player.cmd
"%~dp0install_flash_player_ax.exe" -install
"%~dp0install_flash_player.exe" -install
uninstall.flash.player.cmd
"%~dp0install_flash_player_ax.exe" -uninstall
"%~dp0install_flash_player.exe" -uninstall

Detection method for Flash Player ActiveX
SOFTWARE\Macromedia\FlashPlayerActiveX

Detection method for none-ActiveX version Flash Player
SOFTWARE\Macromedia\FlashPlayerPlugin

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:
http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player.exe
http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player_ax.exe

Blog Archive