Thursday, February 28, 2013

MSH Video Client direct link

For Windows 2000/XP
https://dl.dropbox.com/u/20010827/VClient_5_0_11_136_[full].exe
5d627f7da4eaea99c5439cdc6baf19b3
29e69344fc96b8627e20715bfa55c15885a0c128

For Windows XP/Vista/7:
https://dl.dropbox.com/u/20010827/MSH_VClient_5_0_11_155_wmp_[XpVsW7].exe
55c9ce8f010f41ae69a45abcf834eef1
b22c880a75b3109cafecc0dcd8baf9c5bae812a3

For Windows XP/Vista/7:
https://dl.dropbox.com/u/20010827/MSH_VClient_5_0_11_166_adv_[XpVsW7].exe
6b0e1e496382a5a3cbca2d332d12a037
1240f8665636b8f788f8a2d01ea34a942b5f7136

Automatically accept EULA Adobe Reader 11

To automatically accept Adobe Reader EULA you need to add two keys in HKCU.

Be sure that key EULA=1 is added under
HKCU\Software\Adobe\Acrobat Reader\11.0\AdobeViewer
Be sure that key EULAAcceptedForBrowser=1 is added under
HKCU\Software\Adobe\Adobe Acrobat\11.0\AdobeViewer
So one key is added under Adobe Acrobat Reader section and
second key goes under Adobe Adobe Acrobat section

Two different keys in two registry sections!

Add this command to current user log on script to automatically accept EULA
reg add "HKCU\Software\Adobe\Acrobat Reader\11.0\AdobeViewer" /v EULA /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Adobe\Adobe Acrobat\11.0\AdobeViewer" /v EULAAcceptedForBrowser /t REG_DWORD /d 1 /f
You can also accept EULA when you make new installation:
msiexec /i "AdbeRdr11000_en_US.msi" EULA_ACCEPT=YES /qn
Or pass switches to exe file
"AdbeRdr11000_en_US.exe" /msi /qn /norestart EULA_ACCEPT=YES
To accept Adobe Reader 11 EULA using group policy download adm file:
http://ardownload.adobe.com/pub/adobe/reader/win/11.x/11.0.00/misc/ReaderADMTemplate.zip

Follow instructions in video:

Uninstall Java Updater, {4A03706F-666A-4037-7777-5F2748764D10}

{4A03706F-666A-4037-7777-5F2748764D10} is Java Updater product key.
You can uninstall with:
msiexec /x {4A03706F-666A-4037-7777-5F2748764D10} /qn
Detect and uninstall Java Updater
@echo off
setlocal EnableDelayedExpansion
set sw=HKLM\SOFTWARE
set u=Microsoft\Windows\CurrentVersion\Uninstall
set k={4A03706F-666A-4037-7777-5F2748764D10}
if not "%ProgramFiles(x86)%"=="" set x=Wow6432Node\
reg query "%sw%\%x%%u%\%k%" > nul 2>&1
if !errorlevel!==0 (
msiexec /x {4A03706F-666A-4037-7777-5F2748764D10} /qn
)
endlocal

For remote uninstall
psexec \\%1 msiexec /x {4A03706F-666A-4037-7777-5F2748764D10} /qn
where %1 is Remote Computer Name.

http://live.sysinternals.com/Tools/psexec.exe

Deleting computer object from AD

By deleting computer object from active directory,
you are not able to log on into this machine with domain user credentials.
How sad.

Unplug network cable.
Now you are able again log in on this machine with all your previously cached domain users credentials.
Plug you network cable back and you are able to access all stuff that is assigned to this user.

Did you know that there is one word that describes "bad and wrong"?
This word is BDONG!

Remote uninstall sccm client, command line

@echo off
if "%1"=="" (
echo.
echo Please enter computername to uninstall client
goto exit
)
set sccm_server=
set client=Program Files\Microsoft Configuration Manager\Client
set dest=windows\temp\client
set from=\\%sccm_server%\c$\%client%
set to=\\%1\c$\%dest%
if not exist "%to%" md "%to%"
xcopy /i /c /r /s /y "%from%" "%to%"
psexec \\%1 c:\%dest%\ccmsetup.exe /uninstall
psexec \\%1 rd %systemroot%\ccmsetup /Q /S
psexec \\%1 rd %systemroot%\CCM /Q /S
:exit

Add sccm sarver name to set sccm_server=

Copy this file in %systemroot%\system32 and name it something like sccm.uninstall.client.cmd

Copy psexec in %systemroot%\system32
http://live.sysinternals.com/Tools/psexec.exe

Everytime you want to manually uninstall sccm client on remote machine then
open cmd in "run as administrator" mode
write sccm. and press tab
enter remote computername and press enter.

Wednesday, February 27, 2013

Uninstall all Adobe Reader versions

This will uninstall all Adobe Reader versions via command line:
@echo off
setlocal EnableDelayedExpansion

set U=Microsoft\Windows\CurrentVersion\Uninstall
set v=DisplayVersion

if "%ProgramFiles(x86)%"=="" (
set SW=HKLM\SOFTWARE
) else (
set SW=HKLM\SOFTWARE\Wow6432Node
)

for %%a in ({AC76BA86-7AD7-1033-7646-A00000000001} ^
{AC76BA86-7AD7-1033-7B44-A70000000000} ^
{AC76BA86-7AD7-1033-7B44-A71000000002} ^
{AC76BA86-7AD7-1033-7B44-A80000000002} ^
{AC76BA86-7AD7-1033-7B44-A81000000003} ^
{AC76BA86-7AD7-1033-7B44-A82000000003} ^
{AC76BA86-7AD7-1033-7B44-A83000000003} ^
{AC76BA86-7AD7-1033-7B44-A90000000001} ^
{AC76BA86-7AD7-1033-7B44-A91000000001} ^
{AC76BA86-7AD7-1033-7B44-A92000000001} ^
{AC76BA86-7AD7-1033-7B44-A93000000001} ^
{AC76BA86-7AD7-1033-7B44-A94000000001} ^
{AC76BA86-7AD7-1033-7B44-A95000000001} ^
{AC76BA86-7AD7-1033-7B44-AA0000000001} ^
{AC76BA86-7AD7-1033-7B44-AA1000000001} ^
{AC76BA86-7AD7-1033-7B44-AB0000000001}) do (
reg query %SW%\%U%\%%a > nul 2>&1
if !errorlevel!==0 (
reg query %SW%\%U%\%%a /v %v% | find "%v%"
%systemroot%\system32\msiexec.exe /x %%a /qn
)
)

endlocal
Go to Adobe Reader root section

Windows 8 on one partition

At the start of setup screen press Shift+F10. CMD window should open.

Write down all these steps. Be sure to choose the right disk at Select Disk section.
Diskpart
List Disk
Select Disk 0
Clean
Create Partition Primary
Select Partition 1
Active
Format FS=NTFS Quick
Exit
Output should look like
Close cmd window

Go forward in wizard till installation type. Choose custom installation.

Select partition and click next:

That is it ;)
Now you have windows on one partition.

Source:
http://theitbros.com/how-to-avoid-reserved-or-hidden-partition-in-windows-8/

Back to Windows 8 root

Tuesday, February 26, 2013

Monday, February 25, 2013

Classic Shell msi

Download latest installer:
http://www.classicshell.net/downloads/latest

Look installation options:
ClassicShellSetup_4_3_0.exe /?
I can see how can I get MSI files :)

To get MSI files I use:
ClassicShellSetup_4_3_0.exe extract64
ClassicShellSetup_4_3_0.exe extract32

ClassicShellSetup64_4_3_0.msi
31cddf18dcd2a6b45edd5c663b8aeece
410f868812fd5efb064dfb438d16d229635504af

ClassicShellSetup32_4_3_0.msi
14a51cae935060c62fca8030bc22b308
9fc334aaca66c190b27652964683ee8902d74f51

Repo:
https://drive.google.com/drive/folders/0B_3uBwg3RcdVRkJ3X1BWYVIyZjA

Sunday, February 24, 2013

sed.exe and needed libraries for windows

To run sed on windows you need these files:
http://gnu.catonrug.net/sed.exe
289c007f63e4216757e3c03c38555133
0a70cd396cfbccfc3458cb05929f97041c4962e1

http://gnu.catonrug.net/libiconv2.dll
e0dc8c6bbc787b972a9a468648dbfd85
0f73d47122080a0c5c423841b16f4e6c62d79aff

http://gnu.catonrug.net/libintl3.dll
d202baa425176287017ffe1fb5d1b77c
192e597d8ff0192f6c4e4643361f84277ed51121

http://gnu.catonrug.net/regex2.dll
547c43567ab8c08eb30f6c6bacb479a3
e532e5a3e74926f6a750b3a80d3ea232dd251e4a

Somehow sed.exe NOT work well if copy all these files to %systemroot%\system32
I recommend to always copy where batch file is located and use at each batch file start
set path=%path%;%~dp0
This will support sed command just in current batch file session if the all libraries is next to the batch file.
%~dp0 means "full directory path where batch file is located".


Whole package:
https://dl.dropbox.com/u/93695336/sed-4.2.1-setup.exe

Originaly from:
http://heanet.dl.sourceforge.net/project/gnuwin32/sed/4.2.1/sed-4.2.1-setup.exe

Home:
http://gnuwin32.sourceforge.net/packages/sed.htm

Saturday, February 23, 2013

Picasa install-uninstall command, SCCM

Related files:
http://gnu.catonrug.net/sleep.exe
http://dl.google.com/picasa/picasa38-setup.exe

Picasa.Install.cmd
"%~dp0picasa38-setup.exe" /S /L
Picasa.Uninstall.cmd
@echo off
setlocal EnableDelayedExpansion

if "%ProgramFiles(x86)%"=="" ("%programfiles%\Google\Picasa3\Uninstall.exe" /S /L) else ("%programfiles(x86)%\Google\Picasa3\Uninstall.exe" /S /L) 

if "%ProgramFiles(x86)%"=="" (set SW=HKLM\SOFTWARE) else (set SW=HKLM\SOFTWARE\Wow6432Node)
echo %date% 
echo %time%
:CheckUninstallKey
reg query "%SW%\Microsoft\Windows\CurrentVersion\Uninstall\Picasa 3" > nul 2>&1

if !errorlevel!==0 (
"%~dp0sleep.exe" 1
echo %time%
goto CheckUninstallKey
)

:noPicasa
echo %date% %time%

endlocal

Detection Rule
key:
SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Picasa 3
Value:
DisplayName

Friday, February 22, 2013

Pass variable to batch file

This batch file is waiting for three parameters:
writer.cmd
@echo off
SET ONE=%1
SET TWO=%2
SET THREE=%3
echo %two% %two%
echo %one% %two%
echo %three% %one%
pause

GoTo %appdata%, difference between Windows 7 XP

@echo off
setlocal EnableDelayedExpansion
ver | find "Version 6." > nul 2>&1
if !errorlevel!==0 (
start explorer.exe "%appdata%\..\Local"
) else (
start explorer.exe "%appdata%\..\Local Settings\Application Data"
)
endlocal

Develope Picasa reg tweaks

Files needed:
http://dl.google.com/picasa/picasa38-setup.exe
http://dl.google.com/picasa/picasa39-setup.exe
http://gnu.catonrug.net/sleep.exe
https://dl.dropbox.com/u/93473059/thumbs_index.db

01.Picasa.Uninstall.cmd
@echo off
setlocal EnableDelayedExpansion

if "%ProgramFiles(x86)%"=="" ("%programfiles%\Google\Picasa3\Uninstall.exe" /S /L) else ("%programfiles(x86)%\Google\Picasa3\Uninstall.exe" /S /L) 

if "%ProgramFiles(x86)%"=="" (set SW=HKLM\SOFTWARE) else (set SW=HKLM\SOFTWARE\Wow6432Node)
echo %date% 
echo %time%
:CheckUninstallKey
reg query "%SW%\Microsoft\Windows\CurrentVersion\Uninstall\Picasa 3" > nul 2>&1

if !errorlevel!==0 (
"%~dp0sleep.exe" 1
echo %time%
goto CheckUninstallKey
)

:noPicasa
echo %date% %time%

endlocal
02.RemoveAppDataGooglePicasa2.cmd
@echo off
setlocal EnableDelayedExpansion
ver | find "Version 6." > nul 2>&1
if !errorlevel!==0 (
rd "%appdata%\..\Local\Google\Picasa2" /Q /S
) else (
rd "%appdata%\..\Local Settings\Application Data\Google\Picasa2" /Q /S
)
endlocal
03.RemoveAppDataGooglePicasa2Albums.cmd
@echo off
setlocal EnableDelayedExpansion
ver | find "Version 6." > nul 2>&1
if !errorlevel!==0 (
rd "%appdata%\..\Local\Google\Picasa2Albums" /Q /S
) else (
rd "%appdata%\..\Local Settings\Application Data\Google\Picasa2Albums" /Q /S
)
endlocal
04.RegDelete.cmd
@echo off
setlocal EnableDelayedExpansion

reg query "HKCU\Software\Google\Picasa" > nul 2>&1
if !errorlevel!==0 (
echo Found Picasa settings! Deleting...
reg delete "HKCU\Software\Google\Picasa" /f
) else echo No Picasa settings found!
endlocal
07.Install.Picasa3.8.cmd
@echo off
"%~dp0picasa38-setup.exe" /S /L
08.Install.Picasa3.9.cmd
@echo off
"%~dp0picasa39-setup.exe" /S /L
09.AutoUpgradeAsk.cmd
reg add "HKCU\Software\Google\Picasa\Picasa2\Preferences" ^
/v AutoUpgradeAsk /t REG_DWORD /d 0 /f
10.AutoUpgradeCheck.cmd
reg add "HKCU\Software\Google\Picasa\Picasa2\Preferences" ^
/v AutoUpgradeCheck /t REG_DWORD /d 0 /f
11.ReportStats.cmd
reg add "HKCU\Software\Google\Picasa\Picasa2\Preferences" ^
/v ReportStats /t REG_DWORD /d 0 /f
12.newfeatureslink.Picasa3.8.cmd
reg add "HKCU\Software\Google\Picasa\Picasa2\Preferences" ^
/v newfeatureslink  /t REG_DWORD /d 0 /f
13.ConfiguredSlingshot.cmd
reg add "HKCU\Software\Google\Picasa\Picasa2\Preferences" ^
/v ConfiguredSlingshot /t REG_DWORD /d 6 /f
14.Copy.thumbs_index.db.cmd
@echo off
setlocal EnableDelayedExpansion
ver | find "Version 6." > nul 2>&1
if !errorlevel!==0 (
if not exist "%appdata%\..\Local\Google\Picasa2\db3" md "%appdata%\..\Local\Google\Picasa2\db3"
copy "%~dp0thumbs_index.db" "%appdata%\..\Local\Google\Picasa2\db3" /Y
) else (
if not exist "%appdata%\..\Local Settings\Application Data\Google\Picasa2\db3" md "%appdata%\..\Local Settings\Application Data\Google\Picasa2\db3"
copy "%~dp0thumbs_index.db" "%appdata%\..\Local Settings\Application Data\Google\Picasa2\db3" /Y
)
endlocal
15.showfeatureslink.Picasa3.9.cmd
reg add "HKCU\Software\Google\Picasa\Picasa2\Preferences" ^
/v showfeatureslink /t REG_DWORD /d 39 /f
21.GoToAppData.cmd
@echo off
setlocal EnableDelayedExpansion
ver | find "Version 6." > nul 2>&1
if !errorlevel!==0 (
start explorer.exe "%appdata%\..\Local"
) else (
start explorer.exe "%appdata%\..\Local Settings\Application Data"
)
endlocal
22.GoToAppDataGoogle.cmd
@echo off
setlocal EnableDelayedExpansion
ver | find "Version 6." > nul 2>&1
if !errorlevel!==0 (
start explorer.exe "%appdata%\..\Local\Google"
) else (
start explorer.exe "%appdata%\..\Local Settings\Application Data\Google"
)
endlocal
Go to Picasa root section

Thursday, February 21, 2013

Difference between applications and packages, SCCM

If you want to delivery user settings for example registry keys in HKCU, then only way to do this with system center build in tools is using "Packages" method.

For example you want delivery picasa settings that also includes update settings.
This settings is stored only in current user hive.
reg add "HKCU\Software\Google\Picasa\Picasa2\Preferences" /v AutoUpgradeCheck /t REG_DWORD /d 0 /f

reg add "HKCU\Software\Google\Picasa\Picasa2\Preferences" /v newfeatureslink /t REG_DWORD /d 0 /f

reg add "HKCU\Software\Google\Picasa\Picasa2\Preferences" /v ReportStats /t REG_DWORD /d 0 /f
Screenshot from Packages management:

Msiexec multiple patch, msi, msp

Use ; to use more than one patches:
set src=Server\address\without\spaces
msiexec.exe /i "%src%\AdbeRdr950_en_US.msi" PATCH=%src%\AdbeRdrUpd951_all_incr.msp;%src%\AdbeRdrUpd952_all_incr.msp;%src%\AdbeRdrUpd953_all_incr.msp;%src%\AdbeRdrUpd954_all_incr.msp /qb
You can test it locally by making folder (name must be without spaces) on c:\ and copy all files and make batch. On Windows Vista or later it will work by default on desktop.
msiexec.exe /i "%~dp0AdbeRdr950_en_US.msi" PATCH=%~dp0AdbeRdrUpd951_all_incr.msp;%~dp0AdbeRdrUpd952_all_incr.msp;%~dp0AdbeRdrUpd953_all_incr.msp;%~dp0AdbeRdrUpd954_all_incr.msp /qb
Files:
http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.5.0/en_US/AdbeRdr950_en_US.msi
http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.5.1/misc/AdbeRdrUpd951_all_incr.msp
http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.5.2/misc/AdbeRdrUpd952_all_incr.msp
http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.5.3/misc/AdbeRdrUpd953_all_incr.msp
http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.5.4/misc/AdbeRdrUpd954_all_incr.msp

Wednesday, February 20, 2013

0x87D00325, Removal failed, System Center 2012


The software change returned error code 0x87D00325

This can happen when you call some applications build in uninstaller.
For example you call:
"%programfiles(x86)%\Google\Picasa3\Uninstall.exe" /S /L
or
"%programfiles(x86)%\Notepad++\uninstall.exe" /S
Exact reason why you get this error code is that buld-in uninstaller calls another process and quits by itself.

So now the software center go to next step and use your pre-configured detection method and starts to check it and see that program is still there cause installer will completely uninstall this program only two seconds later.

In other words the software center launch the uninstaller and go to next step to early!

This is how can uninstall notepad++ or any other 32-bit application. This bat file will not quit until the key defined in set k= is not removed
@echo off
setlocal EnableDelayedExpansion
set path=%path%;%~dp0
set sw=HKLM\SOFTWARE
set u=Microsoft\Windows\CurrentVersion\Uninstall
set k=Notepad++
if not "%ProgramFiles(x86)%"=="" set x=Wow6432Node\

reg query "%sw%\%x%%u%\%k%" > nul 2>&1
if !errorlevel!==0 (
for /f "tokens=*" %%a in ('^
reg query "%sw%\%x%%u%\%k%" /v UninstallString ^|
findstr "UninstallString" ^|
sed "s/UninstallString\|REG_SZ//g" ^|
sed "s/^[ \t]*//g"') do (
"%%a" /S
)
)

:CheckUninstallKey
reg query "%sw%\%x%%u%\%k%" > nul 2>&1
if !errorlevel!==0 (
"%~dp0sleep.exe" 1
echo %time%
goto CheckUninstallKey
)

endlocal

Source:
http://social.technet.microsoft.com/Forums/en/configmanagerapps/thread/a8a85481-9ffc-424c-ac03-1691280c3fe7

Picasa silent uninstall

For 32-bit systems use:
"%programfiles%\Google\Picasa3\Uninstall.exe" /S /L
For 64-bit systems use:
"%programfiles(x86)%\Google\Picasa3\Uninstall.exe" /S /L
To use this code in system center save these libraries http://gnu.catonrug.net/libiconv2.dll
http://gnu.catonrug.net/libintl3.dll
http://gnu.catonrug.net/regex2.dll
http://gnu.catonrug.net/sed.exe

Create batch file picasa-silent-uninstall.cmd
@echo off
setlocal EnableDelayedExpansion
set path=%path%;%~dp0
set sw=HKLM\SOFTWARE
set u=Microsoft\Windows\CurrentVersion\Uninstall
set k=Picasa 3
if not "%ProgramFiles(x86)%"=="" set x=Wow6432Node\
reg query "%sw%\%x%%u%\%k%" > nul 2>&1
if !errorlevel!==0 (
for /f "tokens=*" %%a in ('^
reg query "%sw%\%x%%u%\%k%" /v UninstallString ^|
findstr "UninstallString" ^|
sed "s/UninstallString\|REG_SZ//g" ^|
sed "s/^[ \t]*//g" ^|
sed "s/\d034//g"') do (
"%%a" /S
)
)

:CheckUninstallKey
reg query "%sw%\%x%%u%\%k%" > nul 2>&1
if !errorlevel!==0 goto CheckUninstallKey
endlocal
From group policy this will work for Windows 7 and later cause sed do not work from UNC path in earlier version of windows.

Blog Archive