Friday, May 31, 2013

How not to do, second edition

Some time ago i wrote a first post how not to do.

Today i have another true story

Open regedit and open permissions tab on HKEY_CLASSES_ROOT

Add local computer users group full access

This method will not completely brake computer, but makes feel like workin with 33Mhz computer.

This is additional screen:

setup.ini, Adobe Reader 9.5.5

Save all these 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
http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.5.5/misc/AdbeRdrUpd955_all_incr.msp

Use 7-zip to extract setup.exe from AdbeRdr950_en_US.exe or download directly:
https://dl.dropboxusercontent.com/u/20008754/9/setup.exe

Create setup.ini with content:
[Startup]
RequireOS=Windows 2000
RequireMSI=3.0
RequireIE=6.0.2600.0
CmdLine=/spb /rs

[Product]
msi=AdbeRdr950_en_US.msi
CmdLine=EULA_ACCEPT=YES
PATCH="AdbeRdrUpd951_all_incr.msp;AdbeRdrUpd952_all_incr.msp;AdbeRdrUpd953_all_incr.msp;AdbeRdrUpd954_all_incr.msp;AdbeRdrUpd955_all_incr.msp"

[Windows 2000]
PlatformID=2
MajorVersion=5
ServicePackMajor=4

[MSI Updater]
Path=http://ardownload.adobe.com/pub/adobe/reader/win/8.x/8.0/misc/WindowsInstaller-KB893803-v2-x86.exe
Now run the setup.exe and be happy ;)

disable cron job

Use chmod -x to disable one of the cron jobs.

Example:
chmod -x /etc/cron.daily/00webalaizer
When you launch ls -l /etc/cron.daily the 00webalaizer must be in diferent collor

To enable cron job use chmod +x /etc/cron.daily/00webalaizer

Thursday, May 30, 2013

Make link, command line, windows

Use mklnk unility.
https://dl.dropbox.com/u/70933353/mklnk.exe
906b1e9aa025d67d045c34b6fb6526c0
ec09758a3937f1a8004e2ce4eb14d8a9987047ca

Examples:
Create printer spooler directory on desktop
mklnk "%systemroot%\system32\spool\printers" "%userprofile%\desktop\PrintSpoolDir"
Create printer spooler directory on all users desktop on Windows 7
mklnk "%systemroot%\system32\spool\printers" "%userprofile%\..\Public\desktop\PrintSpoolDir"
Create shortcut "this is notepad" on all users desktop on windows 7 with startup directory c:\windows
mklnk -d "%systemroot%" "%systemroot%\notepad.exe" "%userprofile%\..\Public\desktop\this is notepad"
You can not use just "C:\" in startup directory. Use "%homedrive%" instead.

Create internet link on user desktop witch will be opened with default web browser.
mklnk http://www.catonrug.net/ "%userprofile%\desktop\CatOnRug"
Create internet link on user desktop witch will opens with internet explorer
mklnk -a "http://www.catonrug.net/" "%programfiles%\Internet Explorer\iexplore.exe" "%userprofile%\desktop\Cat On Rug IE"
on 64-bit system this will create shortcut whos opening with 64-bit browser. how sad.

Here is full usage:
Usage: mklnk [options] target.exe [link.lnk]

 target.exe   Name of target, use quotes if it contains spaces
 link.lnk     Name of link, use quotes if it contains spaces
              Default is to use the target's name

Options (defaults in parentheses):
-l | --link-name version_info  Use 'version_info' data in target.exe for the
                               link name: ProductName, FileDescription, etc.
-a | --arguments "arg1 arg2"   Command arguments if any, use quotes if needed
-c | --comment   "a comment"   Link comment, use quotes if needed (none)
-d | --directory               Startup directory for shortcut (none)
-s | --show                    Show: 1/normal, 2/maximized, 7/minimized (1)
-i | --icon      ex.ico        .ico or .dll containing icon to display
                               (default is to use icon 0 in target.exe)
-n | --icon-no   index         Integer index of icon in icon file (0)
-t | --target-directory dir    Create link in directory 'dir' (.)
-v | --version                 Show version and copyright and quit
-? | --help                    Show this help message and quit

Examples:
mklnk -a "%HOMEDRIVE%%HOMEPATH%" %SystemRoot%\system32\cmd.exe "Command Prompt"
mklnk -a "--login -i" -i C:\cygwin\cygwin.ico -s7 C:\cygwin\bin\bash.exe "Bash"
Home:
http://smithii.com/mklnk

Windows Update group policy setting under registry

These settings can be found under
HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
You can remove this setting with
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /f

Tuesday, May 28, 2013

[Error number: 0x80070020], Windows Update, XP


For this 0x80070020 code just open cmd and run:
@echo off
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /f net stop wuauserv rd %systemroot%\SoftwareDistribution /Q /S SC sdshow wuauserv SC sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU) wuauclt.exe /detectnow

startup applications

x86 startup application for the local system under 64-bit system look under
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run
This example deletes Cysco System AnyConnect autolaunch application from startup
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run" /v "Cisco AnyConnect Secure Mobility Agent for Windows" /f
x64 startup application for the local system under 64-bit system look under
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
This example will delete 64-bit office 2010 sharpoint additional service
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "BCSSync" /f
Startup application for current user look under:
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
This example deletes Skype application from startup
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v Skype /f
Related:
http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/how-to-disable-bcssync/f451ff83-508c-4781-b367-ed6b57aff61a?msgId=62b730c2-d6c5-4ed2-9a3a-5b71997d52a4

Monday, May 27, 2013

quick re-install windows zabbix client replacing config file


Place this batch file where in bin folder.
@echo off
setlocal EnableDelayedExpansion
set d=C:\Program Files\Zabbix Agent
sc query "Zabbix Agent" | find "RUNNING" > nul 2>&1
if !errorlevel!==0 (
echo Found Zabbix Agent running! Removing now..
net stop "Zabbix Agent"
sc delete "Zabbix Agent"
if exist "%d%" rd "%d%" /Q /S
)
set x=win32
if not "%ProgramFiles(x86)%"=="" set x=win64
echo installing new Zabbix Agent
if not exist "%d%" md "%d%"
xcopy /D /Y "%~dp0%x%" "%d%"

set c=%d%\zabbix_agentd.conf
echo LogFile=%d%\Zabbix_agentd.log > "%c%"
echo DebugLevel=3 >> "%c%"
echo EnableRemoteCommands=1 >> "%c%"
echo Server=zabbix.contoso.com >> "%c%"
echo Hostname=zabbix >> "%c%"

"%d%\zabbix_agentd.exe" -c "%d%\zabbix_agentd.conf" -i

"%d%\zabbix_agentd.exe" -c "%d%\zabbix_agentd.conf" -s

endlocal
pause
Red background is config file integrated in install script. Keep in first line just one > and later just >>.

Sunday, May 26, 2013

Saturday, May 25, 2013

Friday, May 24, 2013

gsp1rmcprxfrer_en_dvd vs gsp1rmcprxfreo_en_dvd

I take two Windows 7 installation disks.
These two disks looks a little different.
On first one is writed X17-03383-02
Label of this DVD is GSP1RMCPRXFRER_EN_DVD
The hash of this disk is:
ed15956fe33c13642a6d2cb2c7aa9749
0bcfc54019ea175b1ee51f6d2b207a3d14dd2b58

This is the same iso which you can download Windows 7 SP1 direct link

On second disk is writed X17-03424-02
Label of this DVD is GSP1RMCPRXFREO_EN_DVD
39134fad6ccc6292a5e81a5dcedc4d13
5998495086fde086b2c8a1e490d8f1cd1dcc99cc

Using UltraISO i extract boot information.
Booth disks have completelly identifical boot sectors with hashes
d4befebf3cef129ac087422b9e912788
62313ec73f381c052f2513ca6279cfb5107e98c0

Using Total Commander i compare the file contents of all 876 files on booth DVDs


Now i find one file diferent
The content of ei.cfg of disk with label GSP1RMCPRXFRER_EN_DVD:
[EditionID]
Professional
[Channel]
Retail
[VL]
0
The content of GSP1RMCPRXFREO_EN_DVD:
[EditionID]
Professional
[Channel]
OEM
[VL]
0
That is it :)

Blog Archive